I replied to this in a previous post... if you dont want to use mfc, i have not done it that way but i am sure there is a way to do it with chdir differently they I have
Well,it does'nt seems to work ?
Dont know why.I have use visual C++ to compile it as an MFC project,no errors but four warnings.
Here is the code with a some very little modifications.
int RenameFiles(char* startingWith, char* renameTo, char* extension)
{
CFileFind finder;
char renameFile[1028];
char temp[1028];
CString fileName;
static int counter;
Lets say that it's better than the first time but they are still some problems.
RenameFiles("advanced","advanced5","txt" gives the following result:advanced..50.txt.
i used the following lines:
_chdir("C:\\Documents and Settings\\Gonzales Cenelia\\Mes documents\\"
RenameFiles("advanced","advanced5","txt"
because this one:
SetCurrentDirectory("C::\\Documents and Settings\\Gonzales Cenelia\\Mes documents"
For people ho are interested here is some code(MFC code) four searching a specific file or folder in a directory or folder.It even search subfolders to.
using namespace std;
void SearchDirectory(char *szFilename,char *szDirectory)
{
CFileFind finder;
char Directory[_MAX_PATH];
char temp[1028];
CString fileName;
static int counter=1;
static int match=0;
static int repeat=0;
bool bImagesExist;
bool bWorking;
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.