how to move (optional) files

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
oko
Senior Member
Senior Member
Posts: 250
Joined: 2007-05-03, 16:22 UTC

how to move (optional) files

Post by *oko »

I want to move two files a.txt, b.txt from c:\ to d:\dir. I created movefiles.txt with 2 names to select. I created 3 em commands for chain to run by 1 button (cmd=em1,em2,em3):

em1: cmd=cd c:\
em2: cmd=LOADSELECTION d:\movefiles.txt
em3: cmd=cm_Renmov /GT="d:\dir\", cm_GoToPreviousDir

The problem is, that sometimes there are none of files (a.txt nor b.txt) in source. In such case I want to move nothing. But tc moves the item under cursor (because nothing is selected). How to avoid this?
Fla$her
Power Member
Power Member
Posts: 2981
Joined: 2020-01-18, 04:03 UTC

Re: how to move (optional) files

Post by *Fla$her »

By means of TC in no way. Use robocopy /mov, cmd /q/c move, etc.
Overquoting is evil! 👎
sa16
Senior Member
Senior Member
Posts: 324
Joined: 2021-09-10, 07:15 UTC

Re: how to move (optional) files

Post by *sa16 »

2oko
Try with LOADLIST:

button: cmd=cm_ClearAll,cm_ShowOnlySelected,em_2,cm_SelectAllFiles,cm_Renmov /GT="d:\dir\",cm_RereadSource

[em_2]
cmd=LOADLIST d:\movefiles.txt

Add:
To avoid binding to the current directory, the lines in movefiles.txt must have paths.
Post Reply