Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ::https://stackoverflow.com/questions/203090/how-do-i-get-current-date-time-on-the-windows-command-line-in-a-suitable-format
- For /f "tokens=2-4 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)
- set renamed_time=%mydate%_%mytime%
- ren c:\new\file.txt file_%renamed_time%.txt
- xcopy d:\file.txt c:\new\file.txt
Advertisement
Add Comment
Please, Sign In to add comment