rename was purposely used like so
rename originalcompletepath nameofnewrenamedfile in current directory
I was shelling out to the console via system () in process.h and I bumped into this problem.
I guess they made it like that on purpose to minimize damage from a rouge app renaming files.
I guess I have to think like a virus writer. I got around the problem by using copy and then the user has a decision to erase the files.
I'll have to tranverse a tree and get all the files in that directory for local renaming uninstead a full path like the copy command can.
example
char command_str[1024]={0}; char old[512]={0},new[512]={0}; //get file names from app arguments sprintf(command_str, "rename %s %s",old,new); system(command_str); //does not work too well sprintf(command_str, "copy %s %s",old,new); system(command_str); //works but it goes slow because it is replicating data.