Scan folders and copy/move a directory if it exists

Try this (added "noterm" in the first part, and changed from TO to CREATEFOLDER so that it should work if the folder does not already exist):

COPY "{filepath|noterm}\archives" CREATEFOLDER "D:\archives of myfiles\{filepath|noroot}"

If you want Opus to show a message box, you can use dopusrt /ArgsMsgBox like this. It will display whatever text you give it, so you can use it to see the command line which would be run:

dopusrt /ArgsMsgBox COPY "{filepath|noterm}\archives" CREATEFOLDER "D:\archives of myfiles\{filepath|noroot}"


(You can also use the DOS echo command when writing MS-DOS Batch buttons, of course.)