Add all selected files to command line

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
dma
Junior Member
Junior Member
Posts: 9
Joined: 2010-10-06, 08:47 UTC

Add all selected files to command line

Post by *dma »

Hello,

I would like to know if there is a way to add all selected files in current active panel, at once to the current command line as separate parameters (with full path)?

I know there's a way using a command with a TC specific parameter (%P%S) on a button, in button bar system. But i need this for any command line i write.

Thanks in advance for your possible answer.
User avatar
Stefan2
Power Member
Power Member
Posts: 4158
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Post by *Stefan2 »

Right click an button, chose 'Change', press F1 key to read the help.

Depends on what you mean on "command line",
but I guess %L or %F is what you are looking for.
Next use your command line tools to parse that list
and process each line/file after the other.



Command line usage:
for /f "usebackq delims=*" %f in ('TYPE "%L"') do @echo %f

Batch file usage:
for /f "usebackq delims=*"%%f in ('TYPE "%L"') do @echo %%f

As TC Button:
CMD=cmd /c
PARAM=for /f "usebackq delims=*"%%f in ('TYPE "%L"') do @echo %%f


CMD=PowerShell -NoExit -NoProfile -ExecutionPolicy Bypass
PARAM=TYPE %L | ForEach{ $_ }


There are maaany examples to find in the forum.
For detailed help, please post more what you are after.
User avatar
dma
Junior Member
Junior Member
Posts: 9
Joined: 2010-10-06, 08:47 UTC

Post by *dma »

Thanks for your support Stefan2.

This is what i would like to achieve:

- step 1: Selecting some files
Image: https://i.imgur.com/9UjtXpV.jpg

- step 2: Starting to type a command
Image: https://i.imgur.com/JT8wdlK.jpg

- step 3: Appending all the selected files names with full path to the command line <- POSSIBLE? Does a (non listed) keyboard shortcut exist for this? Or some other solution?
Image: https://i.imgur.com/hP7yXPa.jpg
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

What is definitely possible is to create a batch or script that will copy selected paths to clipboard so you will only need to paste them to command line.
Post Reply