Move command without validation

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Gameboi
Junior Member
Junior Member
Posts: 13
Joined: 2014-07-27, 21:30 UTC

Move command without validation

Post by *Gameboi »

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.
User avatar
Stefan2
Power Member
Power Member
Posts: 4133
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Move command without validation

Post by *Stefan2 »

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?
Gameboi
Junior Member
Junior Member
Posts: 13
Joined: 2014-07-27, 21:30 UTC

Re: Move command without validation

Post by *Gameboi »

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.
User avatar
tuska
Power Member
Power Member
Posts: 3741
Joined: 2007-05-21, 12:17 UTC

Re: Move command without validation

Post by *tuska »

2Gameboi
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
Simply mark the code, right-click on the TC buttonbar and click on "Insert".

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\
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
Gameboi
Junior Member
Junior Member
Posts: 13
Joined: 2014-07-27, 21:30 UTC

Re: Move command without validation

Post by *Gameboi »

tuska wrote: 2018-10-09, 21:21 UTC 2Gameboi
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
Simply mark the code, right-click on the TC buttonbar and click on "Insert".

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\
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
I'm going to try this. Seems like an overall improvement one way or the other.

Thanks for your efforts.
User avatar
petermad
Power Member
Power Member
Posts: 14741
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Move command without validation

Post by *petermad »

There is no need for a third party program. this button using DOS can do it:

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
And put for example this in you wincmd.ini [Shortcuts] section:

Code: Select all

F6=em_movefiles
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.
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Gameboi
Junior Member
Junior Member
Posts: 13
Joined: 2014-07-27, 21:30 UTC

Re: Move command without validation

Post by *Gameboi »

Where is usercmd.ini located?
User avatar
Stefan2
Power Member
Power Member
Posts: 4133
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Move command without validation

Post by *Stefan2 »

Gameboi wrote: 2018-10-13, 12:53 UTC Where is usercmd.ini located?
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."





 
joe910
Junior Member
Junior Member
Posts: 36
Joined: 2009-02-23, 03:05 UTC
Location: Peoria, IL USA

Re: Move command without validation

Post by *joe910 »

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.
User avatar
petermad
Power Member
Power Member
Posts: 14741
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Move command without validation

Post by *petermad »

Gameboi wrote: 2018-10-13, 12:53 UTC Where is usercmd.ini located?
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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply