File Moving Copying Automation
Posted on 2006-10-28
We have users storing simple word documents into their respective F:\example\userfolder with this format CLIENT-PERSONNAME-DATE-OURUSER.DOC I want a script of some type .bat maybe? Suggestions? That can run at a given time of day that will do a variety of things with these files:
First the script would copy all docs based on each "ouruser" criteria to a seperate folder path like x:\example\ouruser
Maybe something like this, except it would have to be able to search all folders within the F:\ for ouruser # in case someone screws up and drops it in the wrong directory:
COPY F:\*OURUSER1.* x:\example\ouruser1 (how do i get it to search all folders?)
COPY F:\*OURUSER2.* x:\example\ouruser2
Second the script would copy all docs based on "personname" criteria to seperate folder path like z:\example\personname during this action the script would also copy certain "personname" docs to a y:\toprint folder so a person on our staff would know to print them.
COPY F:\*PERSONNAME.* z:\example\personname IF personname EQUALS blah also COPY F:\example\toprint
Problem is the EQUALS list would be rather long? How do I handle that?
somewhere in there or at the end the script I will need to delete all files in the F:\example\userfolder after performing all the above actions, and this has to work flawlessly...haha...
Now, my question is, how to write this? What scripting language? Where do I start and would a simple .bat file work? Currently we are manually moving all files and managing the folders and it's killing us. The filenames are set and exact so that is our one constant. We are running all Windows 2003 Standard Servers with XP machines.