Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- for /f "tokens=1-3 delims=. " %%a in ('date /t') do (set mydate=%%c-%%a-%%b)
- for /f "tokens=1-2 delims=/:" %%a in ("%TIME%") do (set mytime=%%a%%b)
- dir Directory1 /b > list
- robocopy Directory1 Backup
- for /f %%f in (list) do rename Backup%%f %%~nf%mydate%_%mytime%%%~xf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement