Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.
@echo off setlocal enabledelayedexpansion set Source=C:\Data set TargetRoot=F: REM The next line sets the following DateTime variables: DT_Day, DT_DayOfWeek, DT_Hour, DT_Minute, DT_Month, DT_Quarter, DT_Second, DT_WeekInMonth, DT_Year for /f "delims=" %%a in ('wmic.exe Path Win32_LocalTime GET * /value') do (for /f "delims=" %%b in ("%%a") do set DT_%%b) for %%a in (DT_Month DT_Day DT_Hour DT_Minute DT_Second) do (if !%%a! LSS 10 set %%a=0!%%a!) set Timestamp=%DT_Year%%DT_Month%%DT_Day%_%DT_Hour%%DT_Minute% set Target=%TargetRoot%\%Timestamp% robocopy.exe "%Source%" "%Target%" /e /r:0 /w:0
Join the community of 500,000 technology professionals and ask your questions.