Wrong message when creating directory
Moderators: Hacker, petermad, Stefan2, white
Wrong message when creating directory
When you'll try to create dir with ? sign in name, you'll get the following valid message:
Error: Directory [dirname?] not created ; OK and admin rights buttons.
But in the name is only ?, TC shows next:
---------------------------
Total Commander
---------------------------
Error: Directory [?]
already exists!
Please specify a different name.
---------------------------
ОК
---------------------------
Error: Directory [dirname?] not created ; OK and admin rights buttons.
But in the name is only ?, TC shows next:
---------------------------
Total Commander
---------------------------
Error: Directory [?]
already exists!
Please specify a different name.
---------------------------
ОК
---------------------------
WinxP Pro SP2, TC7rc4:
Using <F7>, tried to create a folder named Unguel?tig.
Changed the position of the question mark inside the string several times, does not make any difference.
T.C. always told me:
TC might realize I try to insert a character which cannot be used inside filenames and foldernames, because it is a reserved character. And it might tell me so.
Karl
Using <F7>, tried to create a folder named Unguel?tig.
Changed the position of the question mark inside the string several times, does not make any difference.
T.C. always told me:
So the messagebox looks a bit different for me. But the issue remains the same:Error: Directory [Unguel?tig]
could not be created!
[OK] [As Admininistrator]
TC might realize I try to insert a character which cannot be used inside filenames and foldernames, because it is a reserved character. And it might tell me so.
Karl
Last edited by karlchen on 2007-05-09, 09:39 UTC, edited 1 time in total.
Ok, I see. Hm, really?
Once I confirm the first error message by clicking on [OK], I do not get any second error message at all.
No folder is created - of course not, name was invalid - nothing happens.
---
Once I confirm the first error message by clicking on [As Administrator], I will have to logon using a valid admin account.
Next I will get the first error message again.
I.e. I never see
WinXP Pro SP2, TC7rc4.
OK, I guess you entered as a foldername "?" only, unlike me who entered a string holding ? at a random position.
Karl

Once I confirm the first error message by clicking on [OK], I do not get any second error message at all.
No folder is created - of course not, name was invalid - nothing happens.
---
Once I confirm the first error message by clicking on [As Administrator], I will have to logon using a valid admin account.
Next I will get the first error message again.
I.e. I never see
Really, I do not.---------------------------
Total Commander
---------------------------
Error: Directory [?]
already exists!
Please specify a different name.
---------------------------
ОК
---------------------------
WinXP Pro SP2, TC7rc4.
OK, I guess you entered as a foldername "?" only, unlike me who entered a string holding ? at a random position.
Karl
Last edited by karlchen on 2007-05-09, 09:48 UTC, edited 2 times in total.
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
? is a special placeholder which means "any character". If TC checks whether a folder with this name already exists, Windows tells "yes", because of the updir "." folder. Unfortunately there is no feasible way to avoid this error, sorry.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Why you cannot show your own error megssage instead of Windows's?
I think the message "Directory [?] already exists!" should be shown only if I try to create dir alike "..\?"
I think the message "Directory [?] already exists!" should be shown only if I try to create dir alike "..\?"
Last edited by DrShark on 2007-05-09, 09:54 UTC, edited 1 time in total.
Why not just check if the name entered by the user contains '?' or '*' and in this specific case show another error message? (For example, the same "Directory [...] could not be created!", so that there was no need to add new translations.)ghisler(Author) wrote:Unfortunately there is no feasible way to avoid this error, sorry.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
Using TC 11.03 / Win10 x64
Using TC 11.03 / Win10 x64
The basic question behind the issue reported by DrShark is:
Should T.C. check a given foldername for all possibly illegal characters - the list may differ between OS versions?! - or depend on the OS to make sure no illegal characters will be accepted?
If TC does not check for illegal characters, it cannot issue an error message about them. It will therefore stumble upon and complain about the next subsequent error .
This is why DrShark gets a different error message trying to create folder "?" than me trying to create "unguel?tig". And this is, too, why both error messages do not give a hint what is the problem with our suggested foldernames.
Karl
Should T.C. check a given foldername for all possibly illegal characters - the list may differ between OS versions?! - or depend on the OS to make sure no illegal characters will be accepted?
If TC does not check for illegal characters, it cannot issue an error message about them. It will therefore stumble upon and complain about the next subsequent error .
This is why DrShark gets a different error message trying to create folder "?" than me trying to create "unguel?tig". And this is, too, why both error messages do not give a hint what is the problem with our suggested foldernames.
Karl
2ghisler(Author)
I other words: I don't see how Windows handles a single ? character in a special way for directories.
Similiar discussion (same result): http://www.ghisler.ch/board/viewtopic.php?t=13879&highlight=123
Mh I cannot confirm this. I played a bit with creating directories using CreateDirectory and I always get error 123 if the new directory would contain invalid characters.? is a special placeholder which means "any character". If TC checks whether a folder with this name already exists, Windows tells "yes", because of the updir "." folder. Unfortunately there is no feasible way to avoid this error, sorry.
I other words: I don't see how Windows handles a single ? character in a special way for directories.
Similiar discussion (same result): http://www.ghisler.ch/board/viewtopic.php?t=13879&highlight=123
When try to create it with md command from TC's command line, I get an error "File not found".If try to create folder named " TC also will show msg about existing folder.
2Lefteous
In that topic nobody told about OS which used...I played a bit with creating directories using CreateDirectory and I always get error 123 if the new directory would contain invalid characters.
I have only WinXP SP2 Pro Russian.
- Motorocker
- Member
- Posts: 105
- Joined: 2006-07-19, 10:52 UTC
- Location: Perm, Russia
- Contact:
What for Total tries to create folders with names of existing files and folders or with "?*" symbols?
I have file or a folder 123
I try to create a folder with same name 123
Total shows the message:
-----
Error: Directory [123]
already exists!
Please specify a different name.
-----
I don't have any advantage from this message.
Please, show again dialog for folder creation a still time - in fact clearly, that I'll press F7 again.
Also:
Try to rename any file with symbols (? " */\ |) on desktop of Windows XP and you'll see not modal usually message.
I have file or a folder 123
I try to create a folder with same name 123
Total shows the message:
-----
Error: Directory [123]
already exists!
Please specify a different name.
-----
I don't have any advantage from this message.
Please, show again dialog for folder creation a still time - in fact clearly, that I'll press F7 again.
Also:
Try to rename any file with symbols (? " */\ |) on desktop of Windows XP and you'll see not modal usually message.
Graphics Converter – images conversion
KillOK – Cease to press OK!
NSCopy – copy unreadable
KillOK – Cease to press OK!
NSCopy – copy unreadable
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Sorry, this will need translation, and would cause a 1-2 month delay in the release of the new version...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com