TC4A: MRT fails with colon (":"), maybe other characters

Support for Android version of Total Commander

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

TC4A: MRT fails with colon (":"), maybe other characters

Post by *DrShark »

Android allows to have some characters in file names that are forbidden in Windows, like colon (:).
I have some pictures saved with browser from Twitter that have ":" in their names.
While I tried to modify those names in MRT, and I found that in doesn't support colon in some cases:
1. Load MRT for file which doesn't have colon in name, add ":" after "[N]":
<Error!> will be shown in preview, following try to rename with Start! button will also fail.
2. Close MRT, relopen it for the same file:
[N]: pattern will be auto-restored, and <Error!> is still shown in preview. Now delete ":" which is after "[N]" -> preview will become empty.

Adding colon to a file name when renaming using internal command 129 Rename works fine.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC4A: MRT fails with colon (":"), maybe other characters

Post by *ghisler(Author) »

I'm currently not allowing colons because they would cause troubles when connecting the phone to a Windows PC.
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Re: TC4A: MRT fails with colon (":"), maybe other characters

Post by *DrShark »

ghisler(Author) wrote: 2020-01-31, 15:02 UTC I'm currently not allowing colons because they would cause troubles when connecting the phone to a Windows PC.
Well, at least with WebDav plugin for Total Commander for Windows it's not that bad: on copy from Android device it replaces colon with underscore. If file with underscore already exists in target, in Overwrite dialog desktop TC shows that it is going to replace target file with underscore with source file with colon, so if user copies from Android 2 files: one with underscore and second with colon in the same place, and the rest of their names the same, user will know which file will overwrite target.

Anyway, would be nice to to have a possibility to enable full support of names with such characters in TC4A (as I wrote, command 129 Rename already supports colon, it's MRT which have mentioned problems with it) at least by editing some setting file under /data/data/com.ghisler.android.TotalCommander/shared_prefs/.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Post Reply