Batch help. Modified date and time

April 13, 2011 at 12:44:58
Specs: Windows 7
I'm looking to create a batch file that uses the files modified date and time. Currently I have it using the system date and time, and it works, but its not really what i need.


for /F "tokens=2-4 delims=/- " %%A in ('date/T') do set var=%%C-%%A-%%B

xcopy /qy "C:\test\test.ini" C:\test\test%var%_%time:~-11,2%%time:~-8,2%%time:~-5,2%.ini

How can I get this to use the last modified date and time instead of sytem time?

See More: Batch help. Modified date and time

Report •

April 18, 2011 at 07:48:02
anyone have an answer?

Report •
Related Solutions

Ask Question