"cd \" doesn't work? How to enter root directory no matter which drive we are at?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Joeyy
Junior Member
Junior Member
Posts: 61
Joined: 2016-09-20, 10:09 UTC

"cd \" doesn't work? How to enter root directory no matter which drive we are at?

Post by *Joeyy »

Like if we are at "c:\some\directory", "cd \" go to "c:\"; if we are at "d:\some\directory", "cd \" go to "d:\".

I know the "cm_GoToRoot" command, but is there any way to achieve it through "cd \"?

Thanks!
User avatar
Dalai
Power Member
Power Member
Posts: 10023
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: "cd \" doesn't work? How to enter root directory no matter which drive we are at?

Post by *Dalai »

Works just fine for me. You didn't say what happens on your system. Maybe try a fresh wincmd.ini (without touching the current one):

Code: Select all

totalcmd.exe /i="%TEMP%\fresh.ini"
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
Stefan2
Power Member
Power Member
Posts: 4281
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: "cd \" doesn't work? How to enter root directory no matter which drive we are at?

Post by *Stefan2 »

cd \

works for me in TC-Commandline if I am in "c:\some\directory".
From where do you try?

And with Alt+ArrowDown I can go back to "c:\some\directory"




 
Joeyy
Junior Member
Junior Member
Posts: 61
Joined: 2016-09-20, 10:09 UTC

Re: "cd \" doesn't work? How to enter root directory no matter which drive we are at?

Post by *Joeyy »

@*Stefan2 @*Dalai
I'm sorry for the unclear expression! I mean in the "Directory Hotlist" or "Buttonbar".
User avatar
petermad
Power Member
Power Member
Posts: 16117
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: "cd \" doesn't work? How to enter root directory no matter which drive we are at?

Post by *petermad »

2Joeyy
I mean in the "Directory Hotlist" or "Buttonbar".
It also works fine with cd \ as the command in those 2 places for me...


BTW - there is also the [\] button which is visible unless you have disabled showing both the "drive buttons" and the "drive combobox".

There is a difference between using the "cd \" command and using the [\] button or the cm_GoToRoot command though - cd \ places the file panel cursor at the top, the two others place the cursor at the top-parent directory of the one you were in before using [\] or cm_GoToRoot.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Joeyy
Junior Member
Junior Member
Posts: 61
Joined: 2016-09-20, 10:09 UTC

Re: "cd \" doesn't work? How to enter root directory no matter which drive we are at?

Post by *Joeyy »

petermad wrote: 2022-02-17, 13:35 UTC 2Joeyy
I mean in the "Directory Hotlist" or "Buttonbar".
It also works fine with cd \ as the command in those 2 places for me...


BTW - there is also the [\] button which is visible unless you have disabled showing both the "drive buttons" and the "drive combobox".

There is a difference between using the "cd \" command and using the [\] button or the cm_GoToRoot command though - cd \ places the file panel cursor at the top, the two others place the cursor at the top-parent directory of the one you were in before using [\] or cm_GoToRoot.
I'm sorry, yes, it works if just the command. However, if I put it like this:

command: cd \
start path: cd \

Doesn't work!
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7012
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: "cd \" doesn't work? How to enter root directory no matter which drive we are at?

Post by *Horst.Epp »

Joeyy wrote: 2022-02-18, 13:58 UTC
petermad wrote: 2022-02-17, 13:35 UTC 2Joeyy
I mean in the "Directory Hotlist" or "Buttonbar".
It also works fine with cd \ as the command in those 2 places for me...


BTW - there is also the [\] button which is visible unless you have disabled showing both the "drive buttons" and the "drive combobox".

There is a difference between using the "cd \" command and using the [\] button or the cm_GoToRoot command though - cd \ places the file panel cursor at the top, the two others place the cursor at the top-parent directory of the one you were in before using [\] or cm_GoToRoot.
I'm sorry, yes, it works if just the command. However, if I put it like this:

command: cd \
start path: cd \

Doesn't work!
Why should such a useless construct work ?
Windows 11 Home, Version 24H2 (OS Build 26100.4351)
TC 11.55 RC7 x64 / x86
Everything 1.5.0.1396a (x64), Everything Toolbar 1.5.5.0, Listary Pro 6.3.2.88
QAP 11.9.0.4 x64
User avatar
Hacker
Moderator
Moderator
Posts: 13144
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: "cd \" doesn't work? How to enter root directory no matter which drive we are at?

Post by *Hacker »

Joeyy,
command: cd \
start path: cd \

Doesn't work!
It works here - goes to the root in both panels.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Gral
Power Member
Power Member
Posts: 1609
Joined: 2005-01-26, 15:12 UTC

Re: "cd \" doesn't work? How to enter root directory no matter which drive we are at?

Post by *Gral »

Hacker wrote: 2022-02-18, 15:01 UTC Joeyy,
command: cd \
start path: cd \

Doesn't work!
It works here - goes to the root in both panels.

Roman
Same here - works
User avatar
petermad
Power Member
Power Member
Posts: 16117
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: "cd \" doesn't work? How to enter root directory no matter which drive we are at?

Post by *petermad »

2Joeyy
command: cd \
start path: cd \
Also works fine here for both "Directory Hotlist" and "Buttonbar".

Maybe you have a space after "cd \" in one or both places = "cd \ "
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Joeyy
Junior Member
Junior Member
Posts: 61
Joined: 2016-09-20, 10:09 UTC

Re: "cd \" doesn't work? How to enter root directory no matter which drive we are at?

Post by *Joeyy »

petermad wrote: 2022-02-19, 00:17 UTC 2Joeyy
command: cd \
start path: cd \
Also works fine here for both "Directory Hotlist" and "Buttonbar".

Maybe you have a space after "cd \" in one or both places = "cd \ "
You are right. My mistake.
Post Reply