You will need the "Wait" utility from the NT resource
kit before you try this (if you have mis-placed yours
I will e-mail the file to you).....
rem Create the top of the loop
:Home
rem Copy files in all sub-directories with the archive
rem attribite set and turn off the archive bit. Also continue
rem on an error because the file may be in use.
Xcopy E:\ONYX_1\PROOFS\*.* E:\ONYX_1\INPUT\HP /s /m /c
rem Use the wait utility and tell it to wait for 30 seconds
Wait 30
rem Don't use the next line unless you absolutely must destroy
rem the old files. I would much rather you create duplicates -
rem This line will completely remove and recreate the directory
rem if the removal works (the RD will fail if a file is in use)
RD E:\ONYX_1\PROOFS /s /q |MD E:\ONYX_1\PROOFS
GoTo Home
That's all you will have to do. As always make a good back-up
before running a script that will do any file manipulation.
Thanks.....Jeremy (JeWright@HotMail.com)