?
Solved

I need to copy two files on startup from the network to the local machine

Posted on 2004-11-22
2
Medium Priority
?
210 Views
Last Modified: 2011-04-14
I have two files that need to be copied every morining from a machine, that is on the network (the drive is shared but not mapped), to several other machines on the network. is it possible for me to add this to a bat file or will I have to create vb scirpt and place it in the startup folder. that said, I have no idea what the script sytax should be.
0
Comment
Question by:mayur_ragha
  • 2
2 Comments
 
LVL 97

Expert Comment

by:Lee W, MVP
ID: 12645414
Place the following in a batch file:

for /f "tokens=1" %%a in (computerlist.txt) do (
copy "\\server\share\path\sourcefile.1" "\\%%a\share\path\"
copy "\\server\share\path\sourcefile.2" "\\%%a\share\path\"
copy "\\server\share\path\sourcefile.3" "\\%%a\share\path\"
)

If you can copy the whole Directory, then use:
for /f "tokens=1" %%a in (computerlist.txt) do copy /y "\\server\share\path\*.*" "\\%%a\share\path\"

Where computer list is a file that ONLY contains computer names, one per line, for example:

sales1
sales2
sales3
hr1
hr3
accting11
accting17
testpc
bobspc
0
 
LVL 97

Accepted Solution

by:
Lee W, MVP earned 2000 total points
ID: 12645421
And of course, schedule the batch file in Scheduled tasks on one 2000 or XP to run at the desired time.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
When you discover the power of the R programming language, you are going to wonder how you ever lived without it! Learn why the language merits a place in your programming arsenal.
Progress
Screencast - Getting to Know the Pipeline

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question