Skip to main content

Thanks to help from above... This is what I am using:

C:\Windows\System32>SET short=%date:~10,4%-%date:~4,2%-%date:~7,2% C:\Windows\System32>ECHO -- Short Date: %short% -- Short Date: 2018-06-27 C:\Windows\System32>SET long=%date:~10,4%-%date:~4,2%-%date:~7,2%%time:~0,2%%time:~3,2%_%time:~6,2% C:\Windows\System32>ECHO -- Long Date: %long% -- Long Date: 2018-06-27_10_51_43

C:\Windows\System32>SET short=%date:~10,4%-%date:~4,2%-%date:~7,2% C:\Windows\System32>ECHO -- Short Date: %short% -- Short Date: 2018-06-27 C:\Windows\System32>SET long=%date:~10,4%-%date:~4,2%-%date:~7,2%_%time:~0,2%_%time:~3,2%_%time:~6,2% C:\Windows\System32>ECHO -- Long Date: %long% -- Long Date: 2018-06-27_10_51_43 

I then have logs that are called out in Robocopy jobs like this:

There are many like this: Robocopy C:\Users\ME\Favorites\ %usb%:\Local_PC\Favorites\ /MIR /TEE /FFT /DST /TIMFIX /W:5 /R:5 /NP /LOG+:%usb%:\Robocopy\LOG_%short%.txt

Robocopy C:\Users\ME\Favorites\ %usb%:\Local_PC\Favorites\ /MIR /TEE /FFT /DST /TIMFIX /W:5 /R:5 /NP /LOG+:%usb%:\Robocopy\LOG_%short%.txt 

Ends job with this: REN %usb%:\Robocopy\LOG_%short%.txt COMPLETE_LOG_%long%.log

REN %usb%:\Robocopy\LOG_%short%.txt COMPLETE_LOG_%long%.log 

"COMPLETE_LOG_2018-06-27_10_53_54.log"COMPLETE_LOG_2018-06-27_10_53_54.log is the file produced at the end and it is sortable by file name.

Thanks to help from above... This is what I am using:

C:\Windows\System32>SET short=%date:~10,4%-%date:~4,2%-%date:~7,2% C:\Windows\System32>ECHO -- Short Date: %short% -- Short Date: 2018-06-27 C:\Windows\System32>SET long=%date:~10,4%-%date:~4,2%-%date:~7,2%%time:~0,2%%time:~3,2%_%time:~6,2% C:\Windows\System32>ECHO -- Long Date: %long% -- Long Date: 2018-06-27_10_51_43

I then have logs that are called out in Robocopy jobs like this:

There are many like this: Robocopy C:\Users\ME\Favorites\ %usb%:\Local_PC\Favorites\ /MIR /TEE /FFT /DST /TIMFIX /W:5 /R:5 /NP /LOG+:%usb%:\Robocopy\LOG_%short%.txt

Ends job with this: REN %usb%:\Robocopy\LOG_%short%.txt COMPLETE_LOG_%long%.log

"COMPLETE_LOG_2018-06-27_10_53_54.log" is the file produced at the end and it is sortable by file name.

Thanks to help from above... This is what I am using:

C:\Windows\System32>SET short=%date:~10,4%-%date:~4,2%-%date:~7,2% C:\Windows\System32>ECHO -- Short Date: %short% -- Short Date: 2018-06-27 C:\Windows\System32>SET long=%date:~10,4%-%date:~4,2%-%date:~7,2%_%time:~0,2%_%time:~3,2%_%time:~6,2% C:\Windows\System32>ECHO -- Long Date: %long% -- Long Date: 2018-06-27_10_51_43 

I then have logs that are called out in Robocopy jobs like this:

There are many like this:

Robocopy C:\Users\ME\Favorites\ %usb%:\Local_PC\Favorites\ /MIR /TEE /FFT /DST /TIMFIX /W:5 /R:5 /NP /LOG+:%usb%:\Robocopy\LOG_%short%.txt 

Ends job with this:

REN %usb%:\Robocopy\LOG_%short%.txt COMPLETE_LOG_%long%.log 

COMPLETE_LOG_2018-06-27_10_53_54.log is the file produced at the end and it is sortable by file name.

fixed error on rename where the ":" between HH:MM:SS broke the command. Changed to "-"
Source Link

Thanks to help from above... This is what I am using:

C:\Windows\System32>SET short=%date:~10,4%-%date:~4,2%-%date:~7,2% C:\Windows\System32>ECHO -- Short Date: %short% -- Short Date: 2018-06-27 C:\Windows\System32>SET long=%date:~10,4%-%date:~4,2%-%date:~7,2%%time:~0,2%%time:~3,%TIME2%_%time: =0%~6,2% C:\Windows\System32>ECHO -- Long Date: %long% -- Long Date: 2018-06-27,09:38:48.0927_10_51_43

I then have logs that are called out in Robocopy jobs like this:

There are many like this: Robocopy C:\Users\ME\Favorites\ %usb%:\Local_PC\Favorites\ /MIR /TEE /FFT /DST /TIMFIX /W:5 /R:5 /NP /LOG+:%usb%:\Robocopy\LOG_%short%.txt

Ends job with this: REN "%usb%%usb%:\Robocopy\LOG_%short%.txt" "COMPLETE_LOG_%long%txt COMPLETE_LOG_%long%.log

"COMPLETE_LOG_2018-06-27_10_53_54.log" is the file produced at the end and it is sortable by file name.

Thanks to help from above... This is what I am using:

C:\Windows\System32>SET short=%date:~10,4%-%date:~4,2%-%date:~7,2% C:\Windows\System32>ECHO -- Short Date: %short% -- Short Date: 2018-06-27 C:\Windows\System32>SET long=%date:~10,4%-%date:~4,2%-%date:~7,2%,%TIME: =0% C:\Windows\System32>ECHO -- Long Date: %long% -- Long Date: 2018-06-27,09:38:48.09

I then have logs that are called out in Robocopy jobs like this:

There are many like this: Robocopy C:\Users\ME\Favorites\ %usb%:\Local_PC\Favorites\ /MIR /TEE /FFT /DST /TIMFIX /W:5 /R:5 /NP /LOG+:%usb%:\Robocopy\LOG_%short%.txt

Ends job with this: REN "%usb%:\Robocopy\LOG_%short%.txt" "COMPLETE_LOG_%long%.log"

Thanks to help from above... This is what I am using:

C:\Windows\System32>SET short=%date:~10,4%-%date:~4,2%-%date:~7,2% C:\Windows\System32>ECHO -- Short Date: %short% -- Short Date: 2018-06-27 C:\Windows\System32>SET long=%date:~10,4%-%date:~4,2%-%date:~7,2%%time:~0,2%%time:~3,2%_%time:~6,2% C:\Windows\System32>ECHO -- Long Date: %long% -- Long Date: 2018-06-27_10_51_43

I then have logs that are called out in Robocopy jobs like this:

There are many like this: Robocopy C:\Users\ME\Favorites\ %usb%:\Local_PC\Favorites\ /MIR /TEE /FFT /DST /TIMFIX /W:5 /R:5 /NP /LOG+:%usb%:\Robocopy\LOG_%short%.txt

Ends job with this: REN %usb%:\Robocopy\LOG_%short%.txt COMPLETE_LOG_%long%.log

"COMPLETE_LOG_2018-06-27_10_53_54.log" is the file produced at the end and it is sortable by file name.

Source Link

Thanks to help from above... This is what I am using:

C:\Windows\System32>SET short=%date:~10,4%-%date:~4,2%-%date:~7,2% C:\Windows\System32>ECHO -- Short Date: %short% -- Short Date: 2018-06-27 C:\Windows\System32>SET long=%date:~10,4%-%date:~4,2%-%date:~7,2%,%TIME: =0% C:\Windows\System32>ECHO -- Long Date: %long% -- Long Date: 2018-06-27,09:38:48.09

I then have logs that are called out in Robocopy jobs like this:

There are many like this: Robocopy C:\Users\ME\Favorites\ %usb%:\Local_PC\Favorites\ /MIR /TEE /FFT /DST /TIMFIX /W:5 /R:5 /NP /LOG+:%usb%:\Robocopy\LOG_%short%.txt

Ends job with this: REN "%usb%:\Robocopy\LOG_%short%.txt" "COMPLETE_LOG_%long%.log"