Wrong error when creating file/folder with invalid chars.

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Kimon
Junior Member
Junior Member
Posts: 7
Joined: 2007-01-30, 00:37 UTC

Wrong error when creating file/folder with invalid chars.

Post by *Kimon »

Hi,
just recently i found a wrong error message in TC.
I used shift+f6 to in-place-rename a *.txt file.
By mistake i used a non-allowed char in the file name, "/".
TC pops up an error msg stating that it can't write , and i have to remove the write protection.
Also, in a similar way, if i try to create a file/dir (F7) using invalid chars TC silently fails.
The above using TC 7.01 in Vista.

It's not important, but maybe confusing for some ppl.
Maybe, a more meaningful error message should inform the user about the invalid chars.

Thank you.

EDIT:
after some forum searching (that i should really have done earlier)
i see that the same subject has been discussed before.
A clear error message has to be implemented at some point though.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The slash is interpreted by Windows (NOT by Total Commander) as a directory delimiter, so if you entered e.g.
a/b
then Total Commander tried to move the file to subdir 'a' and name it 'b'.
Author of Total Commander
https://www.ghisler.com
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

ghisler(Author) wrote:The slash is interpreted by Windows (NOT by Total Commander)
Maybe this is worth a change? The normal backslash seems to be passed to Windows, too, and there is a little inconsistency:

- With cm_MoveOnly (F6; and copy functions F5 / Shift+F5) this gets done without an error message (subdir 'a' is created, if it doesn't exist).
- With cm_RenameOnly (Shift+F6) and cm_RenameSingleFile the file only gets moved to a\b, if subdir 'a' exists.
If not, the error dialog "remove write protection" is displayed (no subdir is created by these two commands).

Suggestion (either allow or forbid moving files away):
  • - Integration of a MakeDir routine into cm_RenameOnly and cm_RenameSingleFile would allow moving in all cases (instead of only some, like now).
Or, in contrast:
  • - Preventing the use of slash/backslash in these two functions would prevent (maybe unwanted?) moving to subdirs.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
Post Reply