generate a robocopy logfile in an auto generated folder by the system clock

0

Using robocopy command I would like to auto generate a logfile in an auto generated subdirectory depending on the system clock

Currently I run this in regular command prompt as a standard user.

:start robocopy source destination /E /FFT /Z /R:2 /W:2 /MT:16 /NP /LOG+:"\quintiles.net\enterprise\Apps\Lab-ElispotAP.Secured\Raw.Data\Logs\%date:~-4%%date:~4,2%%date:~7,2%\ElispotRawDataLogdemo3"%time:~0,2%".txt" goto start

I would like to auto generate a subfolder and add a timestamp to the generated log file. Currently I get the following error message:

Invalid Parameter #10 2019/11/06 12:50:57 ERROR 3 (0x00000003) Opening Log File "\quintiles.net\enterprise\Apps\Lab-ElispotAP.Secured\Raw.Data\Logs\2019_11_06\ElispotRawDataLogdemo312.txt" The system cannot find the path specified.

Is this possible in Windows robocopy or should I use the more powerful Powershell?

robocopy
asked on Stack Overflow Nov 6, 2019 by Sasha J • edited Nov 6, 2019 by Sasha J

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0