MoveTo and renaming

  • Thread starter Thread starter Massimiliano Alberti
  • Start date Start date
M

Massimiliano Alberti

If I try to rename a file with the MoveTo (the only function usable to
rename files) and I use as dest name the original name with different case,
the MoveTo fails (example: test.txt -> Test.txt). How can I rename files?

--- bye
 
In the File System, there is no difference between "test.txt" and
"Test.txt", since the file name is case
insensitive, so the MoveTo is effectively a NOP.

Bennie Haelen
 
In the File System, there is no difference between "test.txt" and
"Test.txt", since the file name is case
insensitive, so the MoveTo is effectively a NOP.

Bennie Haelen
If it was a NOP (no operation) then it shouldn't throw... And then, it isn't
true. While NTFS is case insensitive, it can save the case of the filenames.
If you save a file as "Test.txt", it will appear as Test.txt and if you save
it as Test.TXT it will appear as Test.TXT.
The MoveFile API DO let rename files to the same name (I've tried it). The
dos REN DO let rename files to the same name... The Explorer DO let rename
files to the same name.

--- bye
 
Back
Top