Copy selected files to the command line
Moderators: Hacker, petermad, Stefan2, white
-
- Junior Member
- Posts: 6
- Joined: 2015-09-14, 00:46 UTC
Copy selected files to the command line
I just started to use Total Commander instead of using other explorer programs like Windows Explorer.
Right now, I copy the file names to the command line by pressing ctrl and enter for each file. I then use the results in this search (ALT+F7) to locate these files in a different directory. It's very tedious and slow to do this for each file.
Is there a way to copy multiple file names to the command line at the samet time instead of doing ctrl + enter for each file?
Right now, I copy the file names to the command line by pressing ctrl and enter for each file. I then use the results in this search (ALT+F7) to locate these files in a different directory. It's very tedious and slow to do this for each file.
Is there a way to copy multiple file names to the command line at the samet time instead of doing ctrl + enter for each file?
-
- Junior Member
- Posts: 6
- Joined: 2015-09-14, 00:46 UTC
-
- Junior Member
- Posts: 6
- Joined: 2015-09-14, 00:46 UTC
-
- Junior Member
- Posts: 6
- Joined: 2015-09-14, 00:46 UTC
Thank you.
How do I enter both of those commands against the button. I would like one button for both commands. Is there a delimiter to separate like ; to separate commands
cm_CopyNamesToClip;cm_LoadSelectionFromClip
Copying to clipboard under commands<copy selected names to clipboard gives me
file001
file002
file003
My end result that I would like is
file001 file002 file003
I'm trying to search for the same files with a different folder structure from the root or drive like c\, which is why I've been using the search tool.
How do I enter both of those commands against the button. I would like one button for both commands. Is there a delimiter to separate like ; to separate commands
cm_CopyNamesToClip;cm_LoadSelectionFromClip
Copying to clipboard under commands<copy selected names to clipboard gives me
file001
file002
file003
My end result that I would like is
file001 file002 file003
I'm trying to search for the same files with a different folder structure from the root or drive like c\, which is why I've been using the search tool.
You can do this:
But it is senseless because you don't want to select files in same directory where you copy names, you want to switch dir before selecting.
If you want to copy names separated with spaces, you can use following button:
Here ? causes TC to confirm command line before command execution, and %S inserts filenames to it, so you can copy them from that dialog.
Code: Select all
cm_CopyNamesToClip, cm_LoadSelectionFromClip
If you want to copy names separated with spaces, you can use following button:
Code: Select all
Command: .
Parameters: ? %S
Ingenious trick to place all names in a single line ready for copy-paste!MVV wrote: If you want to copy names separated with spaces, you can use following button:Here ? causes TC to confirm command line before command execution, and %S inserts filenames to it, so you can copy them from that dialog.Code: Select all
Command: . Parameters: ? %S
you can even use nircmd or ahk or whatever to set it automatically to the clipboard... you can define a user command to do this !sgp wrote:Ingenious trick to place all names in a single line ready for copy-paste!MVV wrote: If you want to copy names separated with spaces, you can use following button:Here ? causes TC to confirm command line before command execution, and %S inserts filenames to it, so you can copy them from that dialog.Code: Select all
Command: . Parameters: ? %S
Code: Select all
Command: cmd /c
parameters: echo %S>"%TEMP%\tc_listfile.txt"&c:\tools\nirsoft\nircmd.exe clipboard readfile "%TEMP%\tc_listfile.txt"
There should be
doubles percent signs for environment variables in parameters field. Also %T in your example will be interpreted as target path.
This can be achieved also very simple with CLIP.EXE utility
Code: Select all
Command: cmd /c
parameters: echo %S>"%%TEMP%%\tc_listfile.txt"&c:\tools\nirsoft\nircmd.exe clipboard readfile "%%TEMP%%\tc_listfile.txt"
This can be achieved also very simple with CLIP.EXE utility
Code: Select all
Command: CMD.EXE /C ECHO
Parameters: %S | CLIP.EXE
Last edited by Gral on 2015-09-16, 02:35 UTC, edited 1 time in total.
-
- Junior Member
- Posts: 6
- Joined: 2015-09-14, 00:46 UTC
-
- Junior Member
- Posts: 6
- Joined: 2015-09-14, 00:46 UTC
You can get nircmd at http://www.nirsoft.net/utils/nircmd.html
CLIP.EXE is included in every Windows, starting with Windows 2003.
CLIP.EXE is included in every Windows, starting with Windows 2003.