cabledevin
July 10th, 2010, 07:05 PM
I seem to get an CopyFile error 3 with this code. FS means File Size (it checks file size)
fname2 and 3 are both strings.
fname2 = path + "\\" + data.cFileName;
fname3 = "L" + fname2.erase(0,1);
fname2 = "C" + fname2;
if (FileExists(fname3) == false){
CopyFile(fname2.c_str(),fname3.c_str(),0);
}
else {
if (FS(fname3) < FS(fname2)) {
CopyFile(fname2.c_str(),fname3.c_str(),0);
}
}
fname2 and 3 are both strings.
fname2 = path + "\\" + data.cFileName;
fname3 = "L" + fname2.erase(0,1);
fname2 = "C" + fname2;
if (FileExists(fname3) == false){
CopyFile(fname2.c_str(),fname3.c_str(),0);
}
else {
if (FS(fname3) < FS(fname2)) {
CopyFile(fname2.c_str(),fname3.c_str(),0);
}
}