Batch Program

Status
Not open for further replies.

AndyEddy525

Beta member
Messages
1
Everyday I copy several gigabytes of information off of a corporate server. The files are saved in directories that are named by date. I am trying to write a batch program that could automate this process.

Here is an example of the file system:

Drive:/Company1/Study1/061405/(DATA FILES)
Drive:/Company1/Study1/061505/(DATA FILES)

Drive:/Company4/Study5/061505/(DATA FILES)

There are multiple companies and multiple studdies associated with each company. Each study, however, includes data files from the same day. I need to be able to copy all of the folders named '061505', or any other date for that matter, to the local disc in a maintained file-structure:

LOCALDrive:/Company1/Study1/061505/(DATA FILES).

I am not sure if this makes sense. Basically, I need to have a copy of the server on the computer with only the data from one day (from every company and study) in a maintained filesystem (all of the other dates would not be included). Does anybody have any idea how to implement this?
 

office politics

It's all just 1s and 0s
Messages
6,555
Location
in the lab
with batch files, you can pass in parameters with the %X variable; where X is a number. Let's say you execute this command

batch.bat one two three four

inside the batch file would look like this

echo %1
echo %2
echo %3
echo %4

you output would be

one
two
three
four


you can pass in 061505 as your date for the batch file and use %1 wherever you need it.
 
Status
Not open for further replies.
Top Bottom