
June 9th, 2003, 03:00 PM
|
 |
Contributing User
|
|
Join Date: Jan 2003
Location: USA
|
|
|
Just a stupid question that might solve the problem:
When you assign the file name, are you using single or double back-slashes? I.e., you say that tmpRnFile = C:\abc\A.ACK.tmp and RenamedFileName = c:\abc\A.ACK.
But did you actually write them that way or did you write them as "C:\\abc\\A.ACK.tmp" and "c:\\abc\\A.ACK"?.
In C/C++, the back-slash is used in character and string literals as an "escape" with which to represent special characters, like the new-line ('\n') or the NUL ('\0') or a quote mark embedded within the string (eg, "This is an example of \"embedded\" quote marks."). Therefore, to represent an actual backslash in a string literal, you need to enter it twice as I had done in my question above.
Hope that's all it was. If it's any consolation, I've been bitten by the same thing before.
|