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

Posted on 2004-11-22
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.
Question by:mayur_ragha
    LVL 95

    Expert Comment

    by:Lee W, MVP
    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:

    LVL 95

    Accepted Solution

    And of course, schedule the batch file in Scheduled tasks on one 2000 or XP to run at the desired time.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Suggested Solutions

    Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
    Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
    An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now