I'm looking for a simple DOS script to do the following:
*Script will be kicked off monthly by OS Scheduler Service*
1. Create Folder B (If it doesn't already exist) Folder name must be
YYYYMM in the name.
2. Go to Folder A and move all files older than 1 month to Folder B
(Oh, no installation of any 3rd party type utilities can be used, just
plain simple DOS that game with Win 2000)
Seems simple. Can anyone help out?
Thanks.
> I'm looking for a simple DOS script to do the following:
> *Script will be kicked off monthly by OS Scheduler Service*
> 1. Create Folder B (If it doesn't already exist) Folder name must be
> YYYYMM in the name.
> 2. Go to Folder A and move all files older than 1 month to Folder B
> (Oh, no installation of any 3rd party type utilities can be used, just
> plain simple DOS that game with Win 2000)
*** There is no DOS with WIN 2000; it's a somewhat compatible Windows
command-line interface.
For DOS users: This can be done with DOS alone, but it requires many
lines of code to isolate the year and month from the DATE command, and to
either isolate one-month-old files or use XCOPY to temporarily isolate
files less than one month old and then move what is left.
My preference would be to use XSET to define the directory name as
"YYYYMM", then to use XXCOPY's `/DB:' switch to move files more than a
month old into that directory.
Richard Bonner
http://www.chebucto.ca/~ak621/DOS/