vbs script assistance. need help coping logs to a file server.

Posted on 2012-09-05
Last Modified: 2012-09-10
I am looking for help creating the following script. I need to copy a log file from 30 servers to a file location.

copy log from
c:\program files\tivoli\tsm\baclient\dsmsched.log

copy file to
Question by:SANDDRAGON2004
    LVL 43

    Accepted Solution

    create a text file, one server name per line.  Then in a batch file as follows.

    @echo off
    rem Quick dirty get date depends upon system date.  Choose different formats reliably, see article of mine below.
    set d=%date:/=-%
    set source=\c$\program files\tivoli\tsm\baclient\dsmsched.log
    set dest=\\servername\folder\filename

    for /f %%a in (servers.txt) do copy /y "\\%%a\%source%" "%dest%-%%a-%d%.log"

    Author Comment

    thank you! I have been racking my brain with this stuff.  much appreciated man!
    LVL 43

    Expert Comment

    by:Steve Knight
    No problem, glad it helped.


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    I have published numerous articles here at Experts Exchange that present programs/scripts written in a language called AutoHotkey. Each of those articles has a brief paragraph describing where to download the product and how to install it. I have al…
    How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    745 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

    16 Experts available now in Live!

    Get 1:1 Help Now