joeGrammar
Programmer
CFileFind is a great little tool if you have a large list of files you'd like to change the extension to. You don't even have to specify anything on the command line.
All you have to do is create a console application with MFC support, create a CFileFind variable and use it as such:
bool var = finder.FindFile("*.dat"
/* This will find all files with this particular extension
in the current directory(including directory names) */
All you then have to do is create a while statement as such:
while(var)
and within it use such functions in the CFileFind class as:
FindNextFile and
GetFileName /*returns a CString*/
and finally use the MFC rename(char*,const char*) function to rename the found file to whatever you wish
All you have to do is create a console application with MFC support, create a CFileFind variable and use it as such:
bool var = finder.FindFile("*.dat"
/* This will find all files with this particular extension
in the current directory(including directory names) */
All you then have to do is create a while statement as such:
while(var)
and within it use such functions in the CFileFind class as:
FindNextFile and
GetFileName /*returns a CString*/
and finally use the MFC rename(char*,const char*) function to rename the found file to whatever you wish