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

zuku
  • 61
  • 1
  • 7

1 Answers1

2

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

Lenniey
  • 5,220
  • 2
  • 18
  • 29