Switch files A<===>B

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
omeganerd
Junior Member
Junior Member
Posts: 3
Joined: 2013-04-02, 06:24 UTC

Switch files A<===>B

Post by *omeganerd »

One of the features that would be useful is "switch files" feature. After you select two files, either from the same pane or both panes, then you activate the function and the two files would switch places.
User avatar
Vochomurka
Power Member
Power Member
Posts: 816
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Post by *Vochomurka »

Something like:

Code: Select all

move %1%2 %3%2
move %3%4 %1%4
Parameters: %P %N %T %M
Attention: not tested!
Last edited by Vochomurka on 2013-04-11, 12:13 UTC, edited 1 time in total.
Single user license #329241
PowerPro scripts for Total Commander
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Vochomurka,
You need to rename first file, place second one instead of first and then place renamed first instead of second. Three moves total.

So, batch file:

Code: Select all

move "%~1" "%~1.$$tmp"
move "%~2" "%~1"
move "%~1.$$tmp" "%~2"
With parameters %P%S %T%R. It will use two selected files of active panel (if selection exists in active panel), or focused one from active and selected from inactive (if selection exists in inactive panel), or just two focused files in panels.
User avatar
Vochomurka
Power Member
Power Member
Posts: 816
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Post by *Vochomurka »

The topic starter would say which option suits him.
Single user license #329241
PowerPro scripts for Total Commander
Post Reply