-Incorrect result file name after copying

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Sektor
Member
Member
Posts: 166
Joined: 2007-04-04, 10:11 UTC
Location: Russia

-Incorrect result file name after copying

Post by *Sektor »

Say, I have two files:
1) C:\Dir1\aFile.txt
2) C:\Dir2\AFile.txt
If I copy aFile.txt to C:\Dir2\, then, after overwriting, file name in Dir2 remains "AFile.txt". Also I tested it in Windows Explorer - the same thing happens. This is really confusing.
User avatar
Stefan2
Power Member
Power Member
Posts: 4281
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Post by *Stefan2 »

That's the expected behaviour, windowsTM does not take care on the case.

As long as the name itself is the same but only differ in case, there is no update of the filesystem entry.


You can find some more about this topic in the TC forum....
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

User avatar
Sektor
Member
Member
Posts: 166
Joined: 2007-04-04, 10:11 UTC
Location: Russia

Post by *Sektor »

I see. But the result is confusing - this way, it's impossible to say whether file is overwritten.
License #299429
There is no knowledge that is not power
User avatar
Stefan2
Power Member
Power Member
Posts: 4281
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Post by *Stefan2 »

Sektor wrote:I see. But the result is confusing - this way, it's impossible to say whether file is overwritten.
Then use Linux :D

Or a batch/script like this:

1) REN C:\Dir2\AFile.txt >>> C:\Dir2\AFile-temp.txt
2) COPY C:\Dir1\aFile.txt >> C:\Dir2\aFile.txt
wait a second....
3) IF EXISTS C:\Dir2\aFile.txt >>> DEL C:\Dir2\AFile-temp.txt



Another way would be to take a look at the timestamp or size to see if the file was overwritten.

.
User avatar
petermad
Power Member
Power Member
Posts: 16032
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

this way, it's impossible to say whether file is overwritten.
Looking at size and date/time might give you a clue ;-) - unless of course you are using Brief view or other views without these columns.

This is standard Windows behaviour - try it with Windows Explorer - same result.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply