How to write em_command for button to move more 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 write em_command for button to move more files

Post by *oko »

How to write em_command for button to move more files if I know pathes and names like this:
- five files (a.txt, b.doc, c.jpg, d.bmp, e.txt) from C:\dir1\ to D:\dir2\
- then all other files from C:\dir1\ to D:\dir3\

Thank you in advance.
sa16
Senior Member
Senior Member
Posts: 324
Joined: 2021-09-10, 07:15 UTC

Re: How to write em_command for button to move more files

Post by *sa16 »

With Robocopy (from C:\Test\Dir1):
[em_1]
cmd=Robocopy /MOV C:\Test\Dir1 D:\Dir2 "a.txt" "b.doc" "c.jpg" "d.bmp" "e.txt"
[em_2]
cmd=Robocopy /MOV C:\Test\Dir1 D:\Dir3
oko
Senior Member
Senior Member
Posts: 250
Joined: 2007-05-03, 16:22 UTC

Re: How to write em_command for button to move more files

Post by *oko »

and if I want to move files and also dirs in second command?
sa16
Senior Member
Senior Member
Posts: 324
Joined: 2021-09-10, 07:15 UTC

Re: How to write em_command for button to move more files

Post by *sa16 »

Maybe so?
Robocopy /E /MOVE C:\Test\Dir1 D:\Dir3
oko
Senior Member
Senior Member
Posts: 250
Joined: 2007-05-03, 16:22 UTC

Re: How to write em_command for button to move more files

Post by *oko »

2sa16
thanks, it works.
And still one problem:
If the old files (related to the first command) are still in target they are automatically overwriten by new one. Is there option to avoid overwriting e.g. autorename or do not move in such case?
Fla$her
Power Member
Power Member
Posts: 2981
Joined: 2020-01-18, 04:03 UTC

Re: How to write em_command for button to move more files

Post by *Fla$her »

oko wrote: 2025-04-01, 13:23 UTC or do not move in such case?
robocopy C:\dir1 D:\dir2 a.txt b.doc c.jpg d.bmp e.txt /mov /ndl /nfl /njh /njs /xc /xn /xo
Overquoting is evil! 👎
oko
Senior Member
Senior Member
Posts: 250
Joined: 2007-05-03, 16:22 UTC

Re: How to write em_command for button to move more files

Post by *oko »

2Fla$her thank you for help
Post Reply