Reputation: 163
rename("E348.def","E348__.hex");
works, but renaming does not work on files higher up on the directory tree.
Works- rename("/tmp/test", "/tmp/test2");
Doesn't work- rename("/hex/E348.def","hex/E348__.hex" );
Program path: /hex/
.
The hex directory DOES exist and so do the files.
I'm running WIN XP.
Upvotes: 0
Views: 142
Reputation: 35520
You are doing a move, not a rename:
rename("/hex/E348.def","hex/E348__.hex" );
^ ^
leading slash no slash
Upvotes: 3
Reputation: 1606
"/hex/E348.def"
is an absolute path. If your path is "...../here is my program/hex/", you should use "hex/E348.def"
.
Upvotes: 1