I have two files with the same name under the same folder. A file name is different between console and window explorer.
I used my software copy a file from somewhere else and rename it as dxr.jpg. The file did get copied to the Downloads folder, but its name remained as Penguins.jpg. The file’s name appears as dxr.jpg in cmd console, but Penguins.jpg in window explorer. Then, I copied and pasted it under same foler which is Downloads. Then, renamed it as Penguins.jpg. Worked!! Two files with same name.
Using this function:
BOOL WINAPI CopyFile(
_In_ LPCTSTR lpExistingFileName,
_In_ LPCTSTR lpNewFileName,
_In_ BOOL bFailIfExists
);
NOTE: the two files’ name appear the same in window explorer, but, in cmd console, they are different.
I restarted my computer. The situation did not change. Anyone can tell me the reason. I am using windows 7 professional 64 bits.
Virtual shell folder is sort of different from others.