Shortcuts to copy to predefined folder
Moderators: Hacker, petermad, Stefan2, white
Shortcuts to copy to predefined folder
Is there a way to create a keyboard shortcuts that will copy selected file(s) and /or folder(s) to the predefined destination?
Deki
Deki
To my knowledge the easiest way is :
A) Create a script that do the copy.
B) Create a user command that call the script
C) Assign a Keyboard Shortcut to your user command.
To build your script, you can use a simple editor based on the current file selection. You caan get it inside your editor using a command like:
If you need unicode/utf8 you can use %WL or %UL instead of %L.
A) Create a script that do the copy.
B) Create a user command that call the script
C) Assign a Keyboard Shortcut to your user command.
To build your script, you can use a simple editor based on the current file selection. You caan get it inside your editor using a command like:
Code: Select all
command: notepad
parrameter: %L
PowerShell: ForEach in %L Selection Do Copy
As nsp says.
I would try something like:
A+B) Create a script as user command:
\usercmd.ini
[em_CopySelectionToTarget]
cmd=PowerShell
param=TYPE %L | ForEach{ Copy $_ -Recurse 'F:\tmp\predefined destination' }
C) Assign a Keyboard Shortcut to your user command.
Menu > Configuration > Options... > Misc.
Hotkey: choose one
Command: em_CopySelectionToTarget
I would try something like:
A+B) Create a script as user command:
\usercmd.ini
[em_CopySelectionToTarget]
cmd=PowerShell
param=TYPE %L | ForEach{ Copy $_ -Recurse 'F:\tmp\predefined destination' }
C) Assign a Keyboard Shortcut to your user command.
Menu > Configuration > Options... > Misc.
Hotkey: choose one
Command: em_CopySelectionToTarget
PowerShell: ForEach in %L Selection Do Move
WHAT is not working?dekiblue wrote:... with Move ... it's not working.
Use
Command: PowerShell -NoHide to see the error message.
I guess in our case it is "-Recurse is no parameter of MOVE" ?
So modify the PoSh command to:
TYPE %L | ForEach{ Move $_ 'F:\tmp\predefined destination' }
- - -
Better mention that in first place at your initial post to get the right answer you need. Saves time.dekiblue wrote:(I actually have to move those files/folders)