Dir creation

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Jungle
Member
Member
Posts: 129
Joined: 2005-12-03, 11:18 UTC
Contact:

Dir creation

Post by *Jungle »

TC 6.54pb2
I've just tried to create a dir with a leading '\' and it was created in the root of the current drive but not in the current dir. I think all dirs that don't contain drive in the path should be created in the current dir.

Thanks.
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

This is correct behaviour.
'\' means that you want to start from the root of the drive.
You should use '.\' instead of '\' or just put only the name of the directory without any backslash.
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48093
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Indeed this is intentional. Try also there variations:
..\somedir created in the parent directory
somedir1\somedir2\somedir3 all 3 dirs created below each other
c:\somedir dir created in root of c:
somedir1|somedir2|somedir3 all 3 dirs created in current dir
Author of Total Commander
https://www.ghisler.com
Jungle
Member
Member
Posts: 129
Joined: 2005-12-03, 11:18 UTC
Contact:

Post by *Jungle »

djk wrote:This is correct behaviour.
'\' means that you want to start from the root of the drive.
Thank you. I had such idea but decided to check out.
What about a few words to add into the help file (there is nothing about it in the russian one)?
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

If you open a dosbox and type the command md \anydir this dir will also be created in the root of drive.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
MPS
Junior Member
Junior Member
Posts: 90
Joined: 2004-07-27, 15:57 UTC
Location: Poland
Contact:

Post by *MPS »

ghisler(Author) wrote:somedir1|somedir2|somedir3 all 3 dirs created in current dir
well, thanks for that. i totally forgot that multiple dirs can be created with the '|' character - could be useful :]
Jungle
Member
Member
Posts: 129
Joined: 2005-12-03, 11:18 UTC
Contact:

Post by *Jungle »

Sheepdog wrote:If you open a dosbox and type the command md \anydir this dir will also be created in the root of drive.
Well, I'm totally ashamed.

But i have some more words to say.
1. try to create dir 22\\

TC will show error message that dir 22\\ was not created, but it will create dir 22 instead after closing message box.

2. imagine the situation. you want to create dir1|dir2|dir3|...|dirN,
but TC is unable to create several dirs. So you have to close each error message (and while such a message stays open TC will not create other dirs). Maybe it would be better for TC to try to create all dirs and then show one error message with the list of non-created dirs?
___
Little OT.
I write an ahk-script which can automatically create a file in the newely created dir in TC (as i often need it) and the current behaviour complicates my task.

I realize that Mr. Ghisler can't implement every user wish, but i think some things could be improved a little bit to make TC more script-oriented and user-extendable.

Thanks.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48093
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

TC will show error message that dir 22\\ was not created, but it will create dir 22 instead after closing message box.
This is normal - you requested to create dir "22" and subdir "", and the second one of course failed.
Author of Total Commander
https://www.ghisler.com
Jungle
Member
Member
Posts: 129
Joined: 2005-12-03, 11:18 UTC
Contact:

Post by *Jungle »

ghisler(Author) wrote:This is normal - you requested to create dir "22" and subdir "", and the second one of course failed.
i see now. there's probably something wrong with my head :-)
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

No its not.

That is just one of those things
Habemus majkam!
Post Reply