Robocopy Scripts for Directory Opus

  • MtDew12oz,

    Is there a reason the button echos the commands into a temporary batch file and then runs that, instead of simply running the commands?

    Opus automatically generates temporary batch files for the (external) commands in MS-DOS Batch type buttons.

    This much simpler button should have the same result:

    robocopy {sourcepath$|noterm} {destpath$|noterm} /e /move /xo /w:1 /r:1
    pause
    

    It also doesn't leave a temp file sitting in C:\ (Opus deletes its temp batch files automatically). Perhaps most importantly, there is no problem running the simplified button several times as each one will get its own batch file instead of reusing the one in C:\ (which may still be in use).

  • pauloffb,

    You just need to change sourcepath to filepath to do what you want:

    robocopy {filepath$|noterm} {destpath$|noterm} /e /move /xo /w:1 /r:1
    pause
    

    If multiple folders (or files) are selected then Opus will run robocopy once per folder (or file). That should give you what you're after.