Just for clarification, do you also need to rename every directory aside from the files?
This is a discussion on Finding out the name of a file, and changing directory within the C Programming forums, part of the General Programming Boards category; Just for clarification, do you also need to rename every directory aside from the files?...
Just for clarification, do you also need to rename every directory aside from the files?
nope.
@exarath: I did that... I placed one at every line, and it won't show up.
You placed one what?? printf()??Originally Posted by nindoja
Do the breakpoints thing. Where does the renameFiles() function return?? Is the full path dir name valid?? does the directory exists in your PC??
Change thiswith thisCode:if(hTheFiles==INVALID_HANDLE_VALUE) return;Code:if(hTheFiles==INVALID_HANDLE_VALUE){ fprintf(stderr, "ERROR: no files at dir %s", startingDir); return; }
With your last posted source I got this, with a dir created just for testing:
c:\test\
FILE: c:\test\New Flash Document.fla renamed
c:\test\New Folder\
hahahahahahahahahahahahahac:\test\New Folder (2)\
hahahahahahahahahahahahahaFILE: c:\test\New Text Document.txt renamed
FILE: c:\test\New WinZip File.zip renamed
Press any key to continue
Last edited by xErath; 06-23-2004 at 04:10 AM.