1

I tried this on command line and it will work correctly

robocopy /mir /copy:DAT /mot:30  "D:\Source File\file" "E:\Target Directory\backup %DATE:/=-% %time::=-%" /xd "D:\Source File\file\excluded"

But after I create a schedule task to run it, I got 0x10 result

It will just run correctly if I remove this part

%DATE:/=-% %time::=-%

Any suggestion, will help me a lot.

thanks

1 Answer 1

0

I don't think robocopy would understand how to translate the variable %DATE:/=-% or %time::=-% natively. Try changing your scheduled task to run cmd and call robocopy from there.

cmd /c robocopy /mir /copy:DAT /mot:30  "D:\Source File\file" "E:\Target Directory\backup %DATE:/=-% %time::=-%" /xd "D:\Source File\file\excluded"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .