2

I do robocopy using .bat script, this script is starting 22PM before midnight and it took over 5 hours to complete. The problem is that destination folder is created with date \nas01\%date% so when it starts let's say is 10.07.2019 but when robocopy job cross midnight then new destination is created - 11.07.2019 And I have two folders for my backup. How could I resolve this? (I cannot change start time the backup). thanks

  • 3
    Create a local variable with DATE, e.g.: SET DMY=%DATE% and then use %DMY% instead of %DATE% for your destination. Would that work? – Lenniey Jul 10 at 12:27
  • thanks this is working ;) – zuku Aug 13 at 5:25
1

Create a local variable with DATE, e.g.: SET DMY=%DATE% and then use %DMY% instead of %DATE% for your destination.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.