My goal is to create a program that renames all files in the current working directory so that they don't have spaces, any special characters or any accented characters (for example, É became E). I plan to use int rename(const char *oldname, const char *newname);. My problem is how to get the files in the current working directory? I would like the executable file that I created to be placed in a folder with files with bad names and run it, and all the files should be renamed.
Regardless of the platform, a solution would be preferable, otherwise I use Windows 7 Enterprise 32bit.
This question is not a duplicate, because I do not know the path for opendir ("c:\\src\\");in any directory from which the program is running.
source
share