I like to change drive by SHIFT + "drive letter"

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
zvl_tcm
Junior Member
Junior Member
Posts: 6
Joined: 2024-01-10, 21:53 UTC

I like to change drive by SHIFT + "drive letter"

Post by *zvl_tcm »

Can anybody explain me why the TCM allows only use these drive letters in the settings? changing only for A, C, D, E ,Z? If you need others you HAVE TO CHANGE OR UPDATE YOURSEFL "TOTALCMD.INC" to add another drives? WHY? Is it so hard to add it from the installation start? If that exist and is possible where is the problem to have it there from the start so users can use it? Why we have to edit the file ourseleves to add another drives? I amd not getting it for long time, maybe somebody will explain that to me, but adding few more lines to "TOTALCMD.INC" will not harm anybody, but will help users to create shortcut for every drive letter!
zvl_tcm
Junior Member
Junior Member
Posts: 6
Joined: 2024-01-10, 21:53 UTC

Re: I like to change drive by SHIFT + "drive letter"

Post by *zvl_tcm »

probably I wrote it wrong. If you would like to create shortcut for SHIFT+ "drive letter" to change to that drive by "GoToDrive" command, you only can use these below (which are in "TOTALCMD.INC")

cm_GoToDriveA=2061;Switch to drive A
cm_GoToDriveC=2063;Switch to drive C
cm_GoToDriveD=2064;Switch to drive D
cm_GoToDriveE=2065;Switch to drive E
cm_GoToDriveF=2066;(etc, define your own if)
cm_GoToDriveZ=2086;(you need more drives)

That is harcoded in "TOTALCMD.INC"... so you can use TCM command just for drives above. If you need to create shortcut to jump to drive "S" you have to add the row there for drive "S" with appropriate "command number". Why not have there everything from A to Z from beginning?
zvl_tcm
Junior Member
Junior Member
Posts: 6
Joined: 2024-01-10, 21:53 UTC

Re: I like to change drive by SHIFT + "drive letter"

Post by *zvl_tcm »

Did somebody deleted his post to whom I was answering?
User avatar
beb
Senior Member
Senior Member
Posts: 435
Joined: 2009-09-20, 08:03 UTC
Location: Odesa, Ukraine

Re: I like to change drive by SHIFT + "drive letter"

Post by *beb »

2zvl_tcm

To one's amazemenеt, it is doable.

Let's see how it goes for the l: drive, for instance.

Step 1:
Make a user command (usercmd.ini):

Code: Select all

[em_GotoDriveL]
cmd=cm_SrcOpenDrives L
Step 2:
TC menu: Configuration > Options > Misc.
See ''Redefine hotkeys (Keyboard remapping)" section:
2.1. Check "[✓] Shift +" and then from the drop-down to the right choose "L".
2.2. Procced to the ''Command" field below, and type "em_GotoDriveL" there (or choose the command from the drop-down list to the right)
2.3. [OK]
Image: https://i.imgur.com/6pQ2qiH.png

That's it. Voilà.
From now on, until the end of time, you have Shift+L shortcut combination to switch to the l:\ drive.

Repeat it for the other drives you are interested in.
I have tested it up to L*, until became too lazy to carry on.
You can go further, though.

Edit:

[*] Actually, up to Q (em_GotoDriveQ, cm_SrcOpenDrives Q, Shift+Q)

Step 2 can be simplified to direct editing wincmd.ini:

Code: Select all

[Shortcuts]
S+L=em_GotoDriveL
S+Q=em_GoToDriveQ
etc
#278521 User License
Total Commander [always the latest version, including betas] x86/x64 on Win10 x64/Android 10
User avatar
Gral
Power Member
Power Member
Posts: 1467
Joined: 2005-01-26, 15:12 UTC

Re: I like to change drive by SHIFT + "drive letter"

Post by *Gral »

2 beb
Why complicate simple things?

2 zvl_tcm
You don't need add entries to TOTALCMD.INC

This is simplest solution

Code: Select all

[Shortcuts]
S+A=2061
S+B=2062
S+C=2063
S+D=2064
S+E=2065
S+F=2066
S+G=2067
S+H=2068
S+I=2069
S+J=2070
S+K=2071
S+L=2072
S+M=2073
S+N=2074
S+O=2075
S+P=2076
S+Q=2077
S+R=2078
S+S=2079
S+T=2080
S+U=2081
S+V=2082
S+W=2083
S+X=2084
S+Y=2085
S+Z=2086
sa16
Senior Member
Senior Member
Posts: 217
Joined: 2021-09-10, 07:15 UTC

Re: I like to change drive by SHIFT + "drive letter"

Post by *sa16 »

2zvl_tcm
You can still like this:

Code: Select all

[Shortcuts]
S+LEFT=cm_SrcOpenDrives
Press Shift+Left and drive letter or +, *,\.
zvl_tcm
Junior Member
Junior Member
Posts: 6
Joined: 2024-01-10, 21:53 UTC

Re: I like to change drive by SHIFT + "drive letter"

Post by *zvl_tcm »

Thanks all I will try it
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: I like to change drive by SHIFT + "drive letter"

Post by *white »

zvl_tcm wrote: 2024-01-10, 22:58 UTC That is harcoded in "TOTALCMD.INC"... so you can use TCM command just for drives above. If you need to create shortcut to jump to drive "S" you have to add the row there for drive "S" with appropriate "command number". Why not have there everything from A to Z from beginning?
Because it used to be the case that most people didn't need it. And later on it became possible to use a parameter with the cm_SrcOpenDrives command (and similar commands).
Post Reply