file incremental change (batch file)

Dell OPTIPLEX 745
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?

dlegnar@yahoo.com


See More: file incremental change (batch file)

Report •

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

Report •

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

copy c:\vpnconnection.txt s:\timetrak\qas\sapoutput
s:
cd\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!

Dan


Report •
Related Solutions


Ask Question