Batch Program - Techist - Tech Forum

Go Back   Techist - Tech Forum > Computer Software > Microsoft Windows and Software
Click Here to Login
Closed Thread
Thread Tools Display Modes
Old 06-15-2005, 07:46 PM   #1 (permalink)
Newb Techie
Join Date: Jun 2005
Posts: 1
Default Batch Program

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?

AndyEddy525 is offline  
Old 06-15-2005, 09:43 PM   #2 (permalink)
It's all just 1s and 0s
office politics's Avatar
Join Date: Jan 2004
Location: in the lab
Posts: 6,555
Send a message via MSN to office politics

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


you can pass in 061505 as your date for the batch file and use %1 wherever you need it.
office politics is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -5. The time now is 11:05 AM.

Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2018, vBulletin Solutions, Inc.