Move a file from one location to another
Hello
I'm trying to move a file from one location to another in Linux.. I can rename files, but not move them.
This is my code:
1 2
|
rename("/home/myNAME/Bureaublad/folder1/folder2/test.txt", "/home/myName/desktop/test.txt");
|
Why ain't this working?
Thanks for reading,
Niely
What is happening? What does function returns? What is errno is set to?
Okay, the file part works now.
But the folder (what I actually needs not).
This is what I get if I return the int value of the function + the error value:
-1
Error: Directory not empty |
How can I move it with a filled directory?
^Thanks! Just added a random folder after desktop and it works without problems now!
THANKS A LOT!
Topic archived. No new replies allowed.