I have a batch file that's being run with Task Scheduler. This snippet is failing:
Set mm=%DATE:~4,2%
Set dd=%DATE:~7,2%
Set yyyy=%DATE:~10,4%
set t=%TIME:~0,2%
mkdir L:\Weekly\%yyyy%%mm%%dd%%t%\Edge
When I initiate the task, this directory is created:
L:\Weekly\2016063013\Edge
However when the task is run via the scheduled trigger, this directory is created:
L:\Weekly\20160702
I'm having a hard time debugging this error. I need the hour to differentiate between backups that were manually triggered after an event vs. the normal nightly/weekly automated routines.