Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch File Lesson Needed

Status
Not open for further replies.

dukeslater

Technical User
Jan 16, 2001
87
US
Sorry guys (and girls)... I'm not much of a batch file programmer.

I have several files that are created automatically each night. At the very least, I need a batch file that appends the prior day's date to the file name. I can get the current date on there, but I don't know how to subtract a day.

I then need to copy each file to a specified directory, which I do know how to do. However, if we're going to use variables somehow to store the date value, perhaps we could use the same technique to dynamically set the destination directory - for instance, if we have just named the file test02172005.txt, can we have it copy to the 022005 directory without having to change the code each month?

Thanks for your help....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top