Running TC 9.21 x64 in Windows 10. I was trying to rename `test.mp4` to `Glamor : FULL HD.mp4`, just as an example I copied from somewhere, which shouldn't work, and it doesn't. But I was expecting TC to tell me which characters, among `:` is one, not to use in filenames. Instead, it gives me an error "please remove the write protection".
Why this message in the first place? How does TC come to the conclusion the file isn't writable, when it actually really *is* writable, and I'm not even trying to write to it! Clearly this is a bug if not the illegal character thing. Iow: only display the write protection message if the file actually isn't writable *and* has to be written to.
But more importantly, where's the message that says "you cannot use these characters: ..." gone to?
(btw, how to attach an image? I have a screenshot, the image button in the editor just inserts some tags but doesn't let me upload)
rename with illegal character: wrong error message
Moderators: white, Hacker, petermad, Stefan2
rename with illegal character: wrong error message
Total Commander 11 on Windows 10
Re: rename with illegal character: wrong error message
The error message is NOT about directory or file name. It's about (MS-DOS) DEVICE NAME (like LTP1:, COM2:, C:, D:, CON:), as you have used colon.
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator
- ghisler(Author)
- Site Admin
- Posts: 48085
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: rename with illegal character: wrong error message
The colon is indeed special, that's why you get that strange error message. You will be warned about invalid characters when you use other forbidden characters like: <>|"
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: rename with illegal character: wrong error message
What does it have to do with DOS device names when we're renaming a file?
There's no way in heaven or hell that it's ever valid to rename a file to a device name, so it's safe to assume that a colon is always an illegal filename character and should be treated as such, right?
There's no way in heaven or hell that it's ever valid to rename a file to a device name, so it's safe to assume that a colon is always an illegal filename character and should be treated as such, right?
Total Commander 11 on Windows 10
- ghisler(Author)
- Site Admin
- Posts: 48085
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: rename with illegal character: wrong error message
The problem is that Glamor : FULL HD.mp4 isn't really an illegal name - It tells windows to create a file named "Glamor" with alternate data stream "FULL HD.mp4". TC prevents the user from doing this, otherwise it wouldn't be possible to access the data any more. But you can create such streams with Shift+F4. I cannot use the message about illegal characters because : isn't really illegal.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: rename with illegal character: wrong error message
It's not rename only, it's rename OR MOVE, depending on what you type there. You can easy rename file test.txt to newtest.txt or move it to another subdir like ..\new\test.txt.
You can also try to move file to another partition, f.e. from C:\test\test.txt to D:\test\test.txt – but in this case if you use Shift+F6, you will see another misleading error message "Error: Cannot read c:\test\test.txt!"
In your case it was probably try to move a file to alternate file stream, as 2ghisler(Author) said, and colon is just reusing of existing naming convention. You can check what will happen if you try to move (F6) rather than copy (F5) test.txt to LPT1:
As you see, there is a possibility to use device name…
There might be another problem there - trailing space in name ("Glamor "). You should really be very careful with spaces and dots. Some tools (including TC plugins like dbxplug) can create directory or file name ending with space or dot (f.e. based on email subject), but most tools strip trailing space or dot in a target name (if it's without extension), many tools strip trailing space or dot in source names, and some tools also strip leading spaces. F.e. Windows Explorer don't display trailing dot and you can't copy, rename or delete such names using Explorer in a common way.
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator
Re: rename with illegal character: wrong error message
First of all, there is a space before the colon, which in this indicates againt the use of a device.
Secondly, the device name it assumed, doesn't exist (which I'm sure can be checked if need be) so it shouldn't be assumed to be a device.
Third, renaming a file with F2 (which I did) is really weird if it could move to a device. Not only because such devices are seldom used anymore (hey, it's 2018, remember, who has an LPT port these days ) but also because F2 means to primarily rename a file, as is convention.
As for your last statement, I have never had the kind of problems you described. They seem very far fetched, and also irrelevant to the issue.
At any rate, no matter how this problem is explained away (sorry, no offense, it just feels that way to me), the error message is still incorrect.
Secondly, the device name it assumed, doesn't exist (which I'm sure can be checked if need be) so it shouldn't be assumed to be a device.
Third, renaming a file with F2 (which I did) is really weird if it could move to a device. Not only because such devices are seldom used anymore (hey, it's 2018, remember, who has an LPT port these days ) but also because F2 means to primarily rename a file, as is convention.
As for your last statement, I have never had the kind of problems you described. They seem very far fetched, and also irrelevant to the issue.
At any rate, no matter how this problem is explained away (sorry, no offense, it just feels that way to me), the error message is still incorrect.
Total Commander 11 on Windows 10