Copy/move only single file under cursor

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
chojrak11
Junior Member
Junior Member
Posts: 7
Joined: 2009-04-26, 10:52 UTC

Copy/move only single file under cursor

Post by *chojrak11 »

Hello,

Is there a way to perform a copy/move only on a single file under cursor, notwithstanding files/directories that may be selected?

My use case is this - I used the compare directories command (cm_CompareDirs) to select what's missing in target, but not all missing files are worth moving/copying. Therefore I go from one missing file to another, inspect (view) them one by one, and if it's worthy moving, I'd like to use some magic command to only move that file, and all other selected files/dirs should remain selected.

Thanks in advance.
User avatar
petermad
Power Member
Power Member
Posts: 16065
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Copy/move only single file under cursor

Post by *petermad »

2chojrak11
If you want to copy the file under the cursor you can use this button:

Code: Select all

TOTALCMD#BAR#DATA
cm_Copy
%Q/W="%N"G
wcmicons.dll,62
Copy file under cursor to opposite panel - leave other selections untouched


-1
To make the button:
1. Mark the text in the box here above (click SELECT ALL).
2. Copy it to the ClipBoard (press Ctrl+C).
3. Right click on TC's buttonbar and choose "Paste".
If you want to move the file instead you will have to put this command in your usercmd.ini file:

Code: Select all

[em_MoveFileUnderCursor]
cmd=cm_RenMov
param=%Q/W="%N"G
And then use this button:

Code: Select all

TOTALCMD#BAR#DATA
cm_SaveSelection,em_MoveFileUnderCursor,cm_Wait 100,cm_RestoreSelection

wcmicons.dll,63
Move file under cursor to opposite panel - leave other selections untouched


-1

You can open your usercmd.ini file for editing with this command in TC's Command line:

Code: Select all

%COMMANDER_INI_PATH%\usercmd.ini
or

Code: Select all

notepad %COMMANDER_INI_PATH%\usercmd.ini
if you don't have .ini files associated to and editor.


If you want to delete the file under the cursor, you can use this button:

Code: Select all

TOTALCMD#BAR#DATA
cm_SaveSelection,cm_ClearAll,cm_Delete,cm_Wait 1000,cm_RestoreSelection

wcmicons.dll,64
Delete file under cursor - leave other selections untouched


-1
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply