Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
int RenameFiles(char* startingWith, char* renameTo, char* extension)
{
CFileFind finder;
char renameFile[1028];
char temp[1028];
CString fileName;
static int counter;
sprintf(temp,"%s*.*",startingWith);
bool bImagesExist = (bool)finder.FindFile(temp);
while(bImagesExist)
{
bImagesExist = finder.FindNextFile();
if(finder.IsDirectory())continue;
fileName = finder.GetFileName();
sprintf(renameFile,"%s%d.%s",renameTo,counter++,extension);
sprintf(temp,"Renaming %s to %s\n",(LPCTSTR)fileName,renameFile);
cout<<temp;
cout<<(rename((LPCTSTR) finder.GetFileName(),renameFile) ? "COULD NOT RENAME":"RENAMED")<<endl;
}
bool bWorking = finder.FindFile("*.*");
while(bWorking)
{
bWorking = finder.FindNextFile();
if(finder.GetFileName() != "." && finder.GetFileName() != "..")
{
if(finder.IsDirectory())
{
chdir((LPCTSTR)finder.GetFileName());
RenameFiles(startingWith,renameTo,extension);
}
}
}
chdir("..");
return counter;
}