dukeslater
Technical User
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....
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....