Help ! MoveFileEx Problem

I have a piece of code that renames a file from A.ACK.tmp to A.ACK in the same directory (C:\abc). Meanwhile there is another process that polls C:\abc, looking for files with a .ACK extension. Once it sees such a file, it moves it to folder D:\ABC.

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.