Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Brisbane, Australia
    Posts
    245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    WSH - Starting app at time (all)

    I have read a little about Windows Scripting Host and have no idea whether it would be suitable for the following scenario.

    Can I set in place some sort of WSH command to start the copying of data files from the hard drive to an external drive (a 40GB HDD connected to the USB 1.1 port)? Obviously I want it to run automatically about 4 pm each day so that the external drive can be disconnected with the copied files onboard and physically removed from the site.

    Any suggestions or has anyone had experience with WSH in timed events.

    I have tried to use the Task Scheduler but it does not seem to start even when I created an event to happen.

    Leigh

  2. #2
    5 Star Lounger
    Join Date
    Dec 2002
    Location
    Perth, Western Australia, Australia
    Posts
    730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: WSH - Starting app at time (all)

    Task scheduler should work OK - did you use a user id with a password to submit the task?

    Unless you're already familiar with WSH, you could look at <!post=AutoIt,221780>AutoIt<!/post> as a possibly simpler tool. Either with, or without scheduler.
    <font face="Comic Sans MS" color="blue">TimOz</font>
    <img src=/S/flags/Finland.gif border=0 alt=Finland width=30 height=18> <img src=/S/flags/Australia.gif border=0 alt=Australia width=30 height=18>

  3. #3
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    23,585
    Thanks
    5
    Thanked 1,059 Times in 928 Posts

    Re: WSH - Starting app at time (all)

    Look at this short thread <post#=224070>post 224070</post#> for a similar discussion.

    Joe
    Joe

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Brisbane, Australia
    Posts
    245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: WSH - Starting app at time (all)

    Thanks TimOz and Joe for that info!

    I have bitten the bullet and decided to use WSH through the Task Scheduler (with login and password).

    In my case there is an external 40GB drive connected tothe USB 1.1 port on laptop 'A' and a network connection to laptop 'B'. The external HDD is seen by laptop 'A' as "E:"

    The following is the content of a .vbs file I created after reading various posts and subsequent links (incl MS TechNet). When used with Task Scheduler for the timing of the events (every weekday at 4:00pm) it does what I want and the message is a check that the process has happened.

    <pre>'******************************************
    ' Script to backup data from A's laptop
    ' and B's laptop to the removable HDD.
    '******************************************
    ' Data from A's LT is stored in a folder
    ' named "E:A_LTBackup"
    ' Data from B's LT is stored in a folder
    ' named "E:B_LTBackup"
    '******************************************
    Dim FSO
    Set FSO = CreateObject("Scripting.FileSystemObject")
    FSO.CopyFolder "A_PC*.*", "E:A_LTBackup" ' not tested as yet
    FSO.CopyFolder "C:", "E:A_LTBackup"
    WScript.Echo "Selected data has been copied to the removable hard drive."</pre>


    No doubt there would be other ways but this does work. (Note! The UNC reference has not been tested yet)

    Leigh

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •