Date in Command Line Batch File Robocopy

In Knowledge Base Blog by angeladmin

for /f “Tokens=1-4 Delims=/ ” %%i in (‘date /t’) do set dt=%%i-%%j-%%k-%%l
echo %dt%
pause
for /f “Tokens=1-2 Delims=Dir(s) ” %%i in (‘dir c:’) do set test=%%j
for /f “Tokens=1-6 Delims=, ” %%i in (‘echo %test%’) do set test2=%%i%%j%%k%%l%%m%%n
if “%test2%” LSS “82715835391” start notepad

@echo off
cls
echo *** Please Close Edge on All Computers ***
pause
if not exist “c:Edge Backups” md “c:Edge Backups”
for /f “Tokens=1-4 Delims=/ ” %%i in (‘date /t’) do set dt=%%l-%%j-%%k
if not exist “c:edge backupsData %dt%” md “c:edge backupsData %dt%”
robocopy X:Data “c:edge backupsData %dt%” /mir /r:30 /w:2
explorer “c:Edge Backups”
pause

Angel Computers – Contact Us