Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Jul 2001
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    scheduled tasks (Win 2K/XP)

    I have a simple batch file that copy a set of files from drive C to drive D. I wonder if I can put this batch file in Windows' scheduled task and have it run automatically everyday.

    Thanks

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: scheduled tasks (Win 2K/XP)

    Yes, you can. Your command line will need to be a bit different than what you may expect:<pre>%systemroot%cmd.exe /c filename.bat</pre>

    You should also make sure that the task runs in the context of a user with a password assigned. WIndows XP will silently fail on a batch job that runs on an account without a password.
    -Mark

  3. #3
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: scheduled tasks (Win 2K/XP)

    Mark,

    What is the benefit of using <font face="Georgia">%System32%CMD.exe /c </font face=georgia>
    I have lots of scheduled tasks which are just a BAT file, usually of the form
    <font face="Georgia">Batfile.BAT > Outfile.Txt</font face=georgia>

    StuartR

  4. #4
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    Cincinnati, Ohio, USA
    Posts
    7,089
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: scheduled tasks (Win 2K/XP)

    Old habit? I started this practice at my previous position because it ensured that the command window would close. Of course, when the script went belly up, that mattered precious little anyway. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    -Mark

Posting Permissions

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