Move command without validation
Moderators: white, Hacker, petermad, Stefan2
Move command without validation
I'm sure I overlooked it a million times, but I have to manually move files one by one a lot right now. With each move (using the | F6| button, it asks me to verify whether I want to move/delete the file. I want to disable that temporarily. Is that possible?
Have a wonderful day everybody.
Have a wonderful day everybody.
Re: Move command without validation
You can use pure DOS commands like
MOVE [/Y | /-Y] [drive:][path]file name1[,...] destination
https://www.computerhope.com/movehlp.htm
Note the '-Y' parameter of the MOVE command if you could need such security.
For example move file from current active folder to a destination location:
MOVE file.ext "C:\temp"
TC can support you with his parameters for selected file and current target directory.
With such DOS command and TC parameter you can create a user defined command yourself.
{em_Move]
Command=cmd /c
Param=MOVE /-Y %S "%T\"
Hotkey e.g. Shift+F6
Sounds interesting?
MOVE [/Y | /-Y] [drive:][path]file name1[,...] destination
https://www.computerhope.com/movehlp.htm
Note the '-Y' parameter of the MOVE command if you could need such security.
For example move file from current active folder to a destination location:
MOVE file.ext "C:\temp"
TC can support you with his parameters for selected file and current target directory.
With such DOS command and TC parameter you can create a user defined command yourself.
{em_Move]
Command=cmd /c
Param=MOVE /-Y %S "%T\"
Hotkey e.g. Shift+F6
Sounds interesting?
Re: Move command without validation
Hey Stefan2, that doesn't hack it. I have to move file by file often. CLick on one side of the panel to select a folder, go to the other panel and move a file from there. Then rinse and repeat many times.
A solution is just to use CTRL-X. In that case the confirmation box will be skipped. But using the |F6| button is less tiring so I hoped something could be done for that button.
A solution is just to use CTRL-X. In that case the confirmation box will be skipped. But using the |F6| button is less tiring so I hoped something could be done for that button.
Re: Move command without validation
2Gameboi
You could give TeraCopy a try.
Button in TC:
Simply mark the code, right-click on the TC buttonbar and click on "Insert".
Add the following in file "usercmd.ini":
Path to TeraCopy.exe must be adjusted, if necessary.
For the em_command, namely em_TeraCopy_MOVE, a shortcut, e.g. F6, can be defined ...
Create Shortcut:
Configuration - Options... - Misc. - Redefine hotkeys (Keyboard remapping) - choose your hotkey(s) by clicking the appropriate fields,
"Default command (no remapping)" is shown then - click on the magnifying glass to the right - click on "usercmd.ini" -
choose your em_command: em_TeraCopy_MOVE - OK - Important: click on the green checkmark! - OK - FINISHED!
Regards
Karl
You could give TeraCopy a try.
Button in TC:
Code: Select all
TOTALCMD#BAR#DATA
em_TeraCopy_MOVE
%COMMANDER_PATH%\Tools\TeraCopy\TeraCopy.exe,2
TeraCopy - MOVE |Move *"%UL" "%T"
0
10003
Add the following in file "usercmd.ini":
Code: Select all
[em_TeraCopy_MOVE]
button=%COMMANDER_PATH%\Tools\TeraCopy\TeraCopy.exe,2
cmd=%COMMANDER_PATH%\Tools\TeraCopy\TeraCopy.exe
param=Move *"%UL" "%T"
menu=TeraCopy - MOVE
path=%COMMANDER_PATH%\Tools\TeraCopy\
For the em_command, namely em_TeraCopy_MOVE, a shortcut, e.g. F6, can be defined ...
Create Shortcut:
Configuration - Options... - Misc. - Redefine hotkeys (Keyboard remapping) - choose your hotkey(s) by clicking the appropriate fields,
"Default command (no remapping)" is shown then - click on the magnifying glass to the right - click on "usercmd.ini" -
choose your em_command: em_TeraCopy_MOVE - OK - Important: click on the green checkmark! - OK - FINISHED!
Regards
Karl
Re: Move command without validation
I'm going to try this. Seems like an overall improvement one way or the other.tuska wrote: ↑2018-10-09, 21:21 UTC 2Gameboi
You could give TeraCopy a try.
Button in TC:Simply mark the code, right-click on the TC buttonbar and click on "Insert".Code: Select all
TOTALCMD#BAR#DATA em_TeraCopy_MOVE %COMMANDER_PATH%\Tools\TeraCopy\TeraCopy.exe,2 TeraCopy - MOVE |Move *"%UL" "%T" 0 10003
Add the following in file "usercmd.ini":Path to TeraCopy.exe must be adjusted, if necessary.Code: Select all
[em_TeraCopy_MOVE] button=%COMMANDER_PATH%\Tools\TeraCopy\TeraCopy.exe,2 cmd=%COMMANDER_PATH%\Tools\TeraCopy\TeraCopy.exe param=Move *"%UL" "%T" menu=TeraCopy - MOVE path=%COMMANDER_PATH%\Tools\TeraCopy\
For the em_command, namely em_TeraCopy_MOVE, a shortcut, e.g. F6, can be defined ...
Create Shortcut:
Configuration - Options... - Misc. - Redefine hotkeys (Keyboard remapping) - choose your hotkey(s) by clicking the appropriate fields,
"Default command (no remapping)" is shown then - click on the magnifying glass to the right - click on "usercmd.ini" -
choose your em_command: em_TeraCopy_MOVE - OK - Important: click on the green checkmark! - OK - FINISHED!
Regards
Karl
Thanks for your efforts.
Re: Move command without validation
There is no need for a third party program. this button using DOS can do it:
Or if you prefer a keyboard shortcut make this entry in your usercmd.ini file:
And put for example this in you wincmd.ini [Shortcuts] section:
to reassign F6 to this command.
The command above will not work under Windows XP. It gives a warning beep if the source or target is not reachable by DOS or if a disractory with the same name as the file under the cursor already exists in the target - but it overwrites existing files with the same name without warning. It will move all marked files, not just the one under the cursor. It supports Unicode file names.
Code: Select all
TOTALCMD#BAR#DATA
%COMSPEC% /C
if not exist "%P" (echo •) else if not exist "%T" (echo •) else if exist %T%N\ (echo •) else chcp 65001 && %%COMSPEC%% /C for /F "usebackq delims=" %%n in (`type %WL`) do if not exist "%%n\*" move "%%n" "%T\"
%COMMANDER_EXE%,6
Move marked files to opposite panel - without confirmation
1
-1
To make the button:
1. Mark the green text above (click SELECT ALL).
2. Copy it to the ClipBoard (press Ctri+C).
3. Right click on TC's buttonbar and choose "Paste".
Or if you prefer a keyboard shortcut make this entry in your usercmd.ini file:
Code: Select all
[em_movefiles]
cmd=%COMSPEC% /C
param=if not exist "%P" (echo •) else if not exist "%T" (echo •) else if exist %T%N\ (echo •) else chcp 65001 && %%COMSPEC%% /C for /F "usebackq delims=" %%n in (`type %WL`) do if not exist "%%n\*" move "%%n" "%T\"
iconic=1
Code: Select all
F6=em_movefiles
The command above will not work under Windows XP. It gives a warning beep if the source or target is not reachable by DOS or if a disractory with the same name as the file under the cursor already exists in the target - but it overwrites existing files with the same name without warning. It will move all marked files, not just the one under the cursor. It supports Unicode file names.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Move command without validation
Where is usercmd.ini located?
Re: Move command without validation
See "UserCmd.ini - User defined commands (UDC) (em_xxxxx) " >>> viewtopic.php?p=291895#p291895
Scroll there down to "English" and "To create own user commands; use one of this two ways."
Re: Move command without validation
This can be done in TC via Configuration, Misc. I personally don't have it set that way, but it can be without using other software or em-commands.
Re: Move command without validation
It depends on how you have installed your TC.
You can edit it via TC:
1. Run the command cm_CommandBrowser from the command line.
2. Scroll all the way down to the bottom of the Category panel in the "Choose command" dialog
3. Click on usercmd.ini
4. Click the button "New" to make a new command
You can get to the folder that holds usercmd.ini by running the comman cd %COMMANDER_INI% from the command line
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar