Confusing error message with inplace rename

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
umbra
Power Member
Power Member
Posts: 871
Joined: 2012-01-14, 20:41 UTC

Confusing error message with inplace rename

Post by *umbra »

Use an inplace rename (cm_RenameSingleFile, cm_RenameOnly, ...) on some file and try to set its name to something with a backslash in it.
TC will show an error, that it cannot read the original file. That is rather confusing, since the real error is the new filename containing an illegal character.

Also, if you click on OK, a new dialog shows show up saying "Rename/Move "old_file_name" to:". This is also confusing, because the only thing that can be typed in there is a new file name. Anything else (like a path) will cause new errors.
Windows 7 Pro x64, Windows 10 Pro x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48075
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

You can type a path, but it has to exist. The next version will create the path automatically if necessary.
Author of Total Commander
https://www.ghisler.com
umbra
Power Member
Power Member
Posts: 871
Joined: 2012-01-14, 20:41 UTC

Post by *umbra »

Interesting. It actually works with relative paths. I tried it with absolute paths and it did not work.

I'm not sure I like the automatic creation of path, though. Is there going to be a way to disable it? When I use cm_RenameSingleFile or cm_RenameOnly, I expect it to rename a file or show an error, nothing else. There are other commands for moving.
Windows 7 Pro x64, Windows 10 Pro x64
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48075
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

If you write the backslash yourself, you normally expect that the file gets moved to that subdir before the backslash. So 'no', the creation cannot be disabled.
Author of Total Commander
https://www.ghisler.com
umbra
Power Member
Power Member
Posts: 871
Joined: 2012-01-14, 20:41 UTC

Post by *umbra »

No I don't, because I'm using cm_RenameSingleFile or cm_RenameOnly. If I wanted to move something, I would use cm_RenMov or cm_MoveOnly. I mean, names of those commands are pretty descriptive, except they are doing something else.

Also, on some of my keyboards, the upper half of Enter key is replaced by backslash key. So accidentally pressing '\' instead of Enter during rename isn't that much rare.

But I'm not going to argue about that, the original bug report will be solved anyway.
Windows 7 Pro x64, Windows 10 Pro x64
Post Reply