solved [TC 11.00b8] problems with case-different filenames on windows 10

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

solved [TC 11.00b8] problems with case-different filenames on windows 10

Post by *petermad »

Help for Synchronize directories wrote:ø The slashed circle is shown for files which are excluded from sync, e.g. for files which differ only in case like aa.txt and AA.txt.
WIndows 10/11 offers the possiblity of making a folder accept identical filenames with different cases by the use of the command (run it as administrator):

Code: Select all

fsutil.exe file setCaseSensitiveInfo "directory"
Prepare test:
  1. Download this file: https://tcmd.madsenworld.dk/casetest.zip
  2. Open casetest.zip and copy the text inside the button.txt file to clipboard.
  3. Right-click on TC's button bar and choose "Paste" to insert the new button.
  4. Make a folder C:\test\case\
  5. Mark the folder C:\test\case\ and click on the newly made button - accept the UAC warning.
  6. The folder C:\test\case\ can now contain files with the same name but different case in the name.
  7. Copy the two folders "case" and "noncase" from casetest.zip to the C:\test\

First problem - Sorting in archives:
  1. Go into C:\test\case\ on the left side and into casetest.zip\case on the right side.
  2. Make sure the sorting in TC is set to "Natural sorting alphabetical and numbers".
  3. Sort both sides by Name in the same direction.
  4. Notice that C:\test\case and casetest.zip\case is sorted the same way. https://tcmd.madsenworld.dk/caseproblems1.png
  5. Open casetest.zip\case2 in the right side
  6. Notice that casetest.zip\case2 is sorted in the opposite direction. https://tcmd.madsenworld.dk/caseproblems2.png
    The folder case was copied to casetest.zip as a directory, whereas case2 was created with F7, then opened and the files where copied into it.

Second problem - Synchronize directories
  1. Open C:\test\case\ on the left side and C:\test\noncase on the right side.
  2. Open Synchronize directories and click Compare. https://tcmd.madsenworld.dk/caseproblems3.png
  3. Notice how the files are sorted differently in the Sync dialog and in the left side of TC's main window.
  4. Notice that TC unexpectedly suggests to copy left testfile.txt to right testFile.txt *
  5. Notice that TC suggest to copy the other files from left to right, even though that is not possible - the files should have been marked with a red ø
    * If I remove the green suggesions and run the Synchronization, then the file C:\test\noncase\testFile.txt is actually correctly copied to C:\test\case\testFile.txt - although it was sugested by TC to be copied to C:\test\case\testfile.txt
    .
  6. Close the Synchronize dialog and press Ctrl+U to switch the two panels.
  7. Open Synchronize directories and click Compare. https://tcmd.madsenworld.dk/caseproblems4.png
  8. Notice how the files are sorted differently in the Sync dialog and in the right side of TC's main window.
  9. This time TC correctly suggests to copy left file testFile.txt to right file testFile.txt
  10. Notice that TC suggest to copy the other files from right to left, even though that is not possible - the files should have been marked with a red ø

Third problem - Synchronize directories - FTP
  1. Close the Synchronize dialog.
  2. Open an FTP connection in the left panel.
  3. Make a "case" directory on the FTP side.
  4. Copy the files from C:\test\case to the case folder on the FTP side.
  5. Open C:\test\noncase in the right panel.
  6. Open Synchronize directories and click Compare. https://tcmd.madsenworld.dk/caseproblems5.png
  7. Notice how the files are sorted differently in the Sync dialog and in the left side of TC's main window.
  8. Notice that the file testFile.txt is correctly suggested copied from right to left.
  9. Notice that the rest of the files are correctly marked with a red ø because C:\test\noncase does not support multi-case filenames.
    .
  10. Close the Synchronize dialog and press Ctrl+U to switch the two panels.
  11. Open Synchronize directories and click Compare. https://tcmd.madsenworld.dk/caseproblems6.png
  12. Notice how the files are sorted differently in the Sync dialog and in the right side of TC's main window.
  13. Notice that the file testFile.txt is correctly suggested copied from left to right.
  14. Notice that the rest of the files are correctly marked with a red ø because C:\test\noncase does not support multi-case filenames.
    .
  15. Close the Synchronize dialog
  16. Open C:\test\case in the left size
  17. Open Synchronize directories and click Compare. https://tcmd.madsenworld.dk/caseproblems7.png
  18. All the files correctly compare the same.
  19. change the FTP time offset to 2 hour and click Compare again. https://tcmd.madsenworld.dk/caseproblems8.png
  20. Notice that all the files are correctly suggested copied from right to left. No red ø because C:\test\case supports multi-case files.


EDIT:
Maybe there is nothing that can be done to the sorting problems, but it would be good if the Sync. problems with showing wrong copy suggestions could be solved.

Windows Explorer sorts the same way as TC's Reversed Name sorting, and changing Name sort direction in Explorer has no effect for these files. https://tcmd.madsenworld.dk/caseproblems9.png

Also the DIR command shows peculiar sorting. Sorting with DIR /ON and DIR/O-N should be reversed but is not (though different). Using DIR without parameters sorts like TC's Reversed Name sorting. https://tcmd.madsenworld.dk/caseproblems10.png

Changing TC's "Sort method" is without any effect for these filenames.
Last edited by petermad on 2023-06-28, 19:38 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.00b8] problems with case-different filenames on windows 10

Post by *ghisler(Author) »

1. Currently TC does not do case sensitive sorting, so what you get is completely random.
2. It only supports case sensitive sync in local folders when BOTH sides support it.
3. It only supports case sensitive sync with FTP when the local folder supports it.
4. It only shows the "forbidden" icons with FTP when the local folder doesn't support case sensitive names.

In your second problem, it would work if both directories had the case sensitive flag set.

There is indeed place for a lot of improvement, but don't expect too much because it makes sync much more complex.
I will concentrate on the following two cases:
1. I don't know whether natural sorting supports case sensitive comparison, but probably not.
2. It would be useful to get the "forbidden" icons when only one of the sides supports case sensitive names.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.00b8] problems with case-different filenames on windows 10

Post by *petermad »

2. It would be useful to get the "forbidden" icons when only one of the sides supports case sensitive names.
I think that is the most important subject to work on.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.00b8] problems with case-different filenames on windows 10

Post by *ghisler(Author) »

I found a solution for 1: If case insensitive comparison returns "equal", repeat the comparison with case sensitive function

Unfortunately I could not find a solution for 2: There are just too many cases to consider, e.g. when one side allows duplicate names and the other doesn't, or doesn't exist, or one allows them and the other doesn't but the files all differ in case between the sides, etc. etc. I tried to put together a logical map of how to handle it, but it became very complex.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.00b8] problems with case-different filenames on windows 10

Post by *petermad »

28.06.23 Fixed: Synchronize dirs: Correct sort orders of files differing only in case (32/64)
28.06.23 Fixed: Synchronize dirs: When uploading files to ftp from a case-insensitive directory, preserve case of matched remote file to not create duplicates (32/64)
27.06.23 Added: Synchronize dirs: Better handling of case sensitive folders: Case sensitive sync when both sides support case sensitive names, e.g. two local directories or one local and one ftp/plugin (32/64)
25.06.23 Fixed: In case sensitive directories, files which differred only in upper-/lowercase were sorted randomly, now sort with uppercase first (32/64)
25.06.23 Fixed: Synchronize dirs: Synchronizing from local directory supporting case-sensitive names to FTP could overwrite wrong files if there was already a file with that name on the server (32/64)
Confirmed fixed in TC 11.00b9 :-) Well done :!:
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: solved [TC 11.00b8] problems with case-different filenames on windows 10

Post by *ghisler(Author) »

It was a lot of work, but I think it was worth the effort.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: solved [TC 11.00b8] problems with case-different filenames on windows 10

Post by *petermad »

Yes, and in this respect TC beats Explorer which cannot sort these name in reversed order of by extension :-)
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply