file incremental change (batch file)

March 1, 2010 at 07:23:45
Specs: Windows XP
How can I tell the batch file that if the name already exists to change the current file name to the same file name but with the current date and time in the file name?

See More: file incremental change (batch file)

Report •

March 1, 2010 at 08:14:15
if exist %1 ren %1 %~n1%date%%~x1

Report •

March 1, 2010 at 09:10:09
Ok, thank you...but I guess I'm a total beginner at is what I'm trying to get.

copy c:\vpnconnection.txt s:\timetrak\qas\sapoutput
If exist %1 ren %1 %~n1%date%%~x1

I need to copy and rename the file vpnconnection (this is just an example) to vpnconnection or vpn with the current date after it.

If you can help that would be excellent!


Report •
Related Solutions

Ask Question