Hi,
I would like to append two strings together so that I can rename a file using the MoveFile function. But my strings refuse to concatenate, so instead of adding "E:\" to "FILE-%s-%02d%02d%02d-%02d%02d.txt" to give me "E:\FILE-%s-%02d%02d%02d-%02d%02d.txt", it gives me just "E:\" as if nothing happened.
Here is a snippet of my full code:
drivePathAgain = "E:\\";
sprintf(newname, "FILE-%s-%02d%02d%02d-%02d%02d.txt", szVolNameBuff, lt.wYear, lt.wMonth, lt.wDay, lt.wHour, lt.wMinute);
lstrcat((LPWSTR)drivePathAgain, (LPWSTR)newname);
result = MoveFile((LPCWSTR) drivePath, (LPCWSTR) drivePathAgain );
I can't append newname to drivePathAgain. If you need me to post the entire code to get the big picture, I can. Is there a way to append strings like that?
Thanks