Copy current path to clipboard or select address bar in Total Commander

23

9

Is there any shortcut to copy the path of the current directory in Total Commander?

Also, is it possible to select or highlight the address bar with a keyboard shortcut?

Mert Nuhoglu

Posted 2012-02-09T09:06:44.003

Reputation: 1 970

Answers

24

You can indeed copy the path of any file or folder you are viewing in any of the panes.

CTRL+P will add the current directory path to the address bar.

You can also get individual files' paths. Select the files you want to get the path from, click

Mark > Copy Names With Path To Clipboard.

You can even add a new button to the toolbar which activates this command if you use this function very often. Add a new button to the toolbar, and assign it this command: cm_CopyFullNamesToClip

Another option for easy access is to map a custom keyboard shortcut to this function. This is done in

Configuration > Misc.

As for a shortcut to focus on the command line, there is no built in shortcut to do it, but you can again assign a new button or keyboard shortcut to the command cm_FocusCmdLine, which takes you from wherever you are straight to the command bar, selecting its whole content.

molgar

Posted 2012-02-09T09:06:44.003

Reputation: 1 551

14

Home, then Shift+F6.

As molgar / randy-skretka said, and also Ctrl+P but use Shift+ and Shift+ to go to command line and cut with Ctrl+X.

because that also works in Brief and Thumbnail View 'mode', not only in Full (extra: see available modes with Shift+F1).

n611x007

Posted 2012-02-09T09:06:44.003

Reputation: 5 291

10

Is there any shortcut to copy the path of the current directory in Total Commander?

Ctrl+P and then OR (arrow keys) to copy the current directory to the command line and then select it for you. Then just Ctrl+C copy.

Also, is it possible to select or highlight the address bar with a keyboard shortcut?

Use your Home key to put you over the [..] notation at the top of the directory listing. That's the parent directory. Then use Shift+F6 to focus on and highlight the address bar (edit it if you need to!).

Randy Skretka

Posted 2012-02-09T09:06:44.003

Reputation: 371

in TC 8+ it's shift+F6 for me, not ctrl+f6. edited the answer since I accidentally entered the 'directotry bar' / 'breadcrumb bar' / 'current directory above the file lists' by accident and was looking for the shortcut – n611x007 – 2013-06-04T10:08:02.447

the OR won't work in all situations. Consider thumbnail mode or Ctrl+F1 'Brief' mode. use Shift+ instead – n611x007 – 2013-06-04T10:10:18.173

7

Configuration -> Options -> Misc. -> Redefine hotkeys -> Hotkey -> Assign a desired hotkey (e.g F10) -> Command cm_CopySrcPathToClip

This is what the configuration menu looks like:

URL for the image of the configuration menu

Beens

Posted 2012-02-09T09:06:44.003

Reputation: 71

Can you expand your answer a little to explain how to accomplish this? Thanks. – fixer1234 – 2016-01-25T18:03:04.430

if you need a full file path with file name in it then use cm_CopyFullNamesToClip. – Alex – 2019-01-22T11:47:15.993

7

A good hack is using: Configuration>Options>Misc>Redefine hotkeys. Now you can add Control + L and in Command select cm_EditPath

pressing Control+L will select the path just like Firefox, Explore (in windows 8), Dolphin, Nautilus, ...

Majid Asgari

Posted 2012-02-09T09:06:44.003

Reputation: 71

And it work for me to copy directory current path also :) – CoDe – 2015-07-22T09:17:53.100

Also look here.

– Mohammad Dehghan – 2015-10-14T16:30:46.853

2

I don't think there are keyboard shortcuts to either of the functions.

A list of TC hotkeys can be found here: http://www.keyxl.com/aaa8055/84/Total-Commander-keyboard-shortcuts.htm

There is a way to create custom hotkeys for functions in TC (for all available commands) or even for custom commands. Information can be found here and here. You may be able to create your desired shortcuts there.

user 99572 is fine

Posted 2012-02-09T09:06:44.003

Reputation: 3 173

0

I think ctrl-d is what you wanted, then you can use ctrl+c to copy the path.

shaojwa

Posted 2012-02-09T09:06:44.003

Reputation: 1

0

Usually TC allows to edit current path if you press Shift+F6 on ".." item. But you may assign any hotkey under Configuration - Misc. for internal command cm_EditPath and use it for this task - it will work always. E.g. I like to use Alt+Up hotkey.

Source: Shortcut to the path area (current directory) ? (solved)

user685044

Posted 2012-02-09T09:06:44.003

Reputation: 1

0

What about a 1-click solution? It's using Python (which is great for so many reasons):

  1. [ If you don't have it yet ]: Install Python from https://www.python.org/downloads/ (in general the latest version before 3.0 is generally recommended, it has greater support, but in this case it shouldn't matter).
  2. [ If you don't have it yet ]: In command line type: pip install pyperclip.
  3. Write the following short script and save it as a .pyw file:

    '''
        Run from TC's button with a "%P parameter (not "%p)
        It will pass the current path into the clipboard
    '''
    import sys, pyperclip
    
    pyperclip.copy(' '.join(sys.argv[1:]))
    
  4. Drag the script onto your TC's button bar. It will become a button.
  5. Right-click on the newly created button and in the "Parameters" field type "%P (not "%p; the single double-quotation mark " is important to handle paths with more than one space character next to each other).
  6. [ Optional ]: Change it's icon by typing wcmicons.dll in the "Icon file" field, and select something intuitive, like: enter image description here

From now on, whenever you click on that button, the full path to your current panel's directory will be copied into the clipboard!

ellockie

Posted 2012-02-09T09:06:44.003

Reputation: 161

-1

A solution with bat instead of python:

  1. go to "configuration/Misc/redefine hotkeys"
  2. chose a free key combination
  3. press the magnifying glass button
  4. press the new button to define a new user command
  5. in the command write: cmd /c echo
  6. in the parameters: %P | clip
  7. click on "OK" twice, then press the green checkbox

Miki

Posted 2012-02-09T09:06:44.003

Reputation: 1

Technically its not wrong, but its kind of a long stretch. – Mahmoud Khaled – 2017-11-01T08:26:49.780

-1

CNTRL-P is correct, but to have the current path in the command-area on the bottom, there is CNTRL-SHIFT-ENTER

Dirk Zaal

Posted 2012-02-09T09:06:44.003

Reputation: 1