Results 1 to 3 of 3

Thread: Wait Until (XP)

  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Wait Until (XP)

    Is it possible to use windows scheduler to wait for a particular file to show up and then perform some other task?

    I am thinking that it would have to be done in a batch file and have the scheduler kick-off every 15 minutes or so. I not sure how to do it in a batch file.

    Any assistance is truly appreciated.

    Thanks,
    John

  2. #2
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Wait Until (XP)

    If I assume that the function of the BATch file is to check every 15 minutes for a file called ITSHERE.TXT to turn up (once only) in the current directory, and that you are going to do something (once only) on its arrival and then terminate, something like the following would work.

    <pre>@echo off
    :: we wait an initial 15 minutes (15 * 60 = 900 seconds) because it's easier to code!!
    :loop
    ping -n 900 127.0.0.1 > nul & :: this actually waits 899 seconds at almost no cost
    if not exist itshere.txt goto loop
    :: now we do whatever you want when the file is present</pre>

    You can see that more explanation may be required!

    John
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  3. #3
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Wait Until (XP)

    John,

    This is what is was looking for. I'll have to try it out and if I have any issues I'll be be back (got this phrase from Arnold)

    Thanks,
    John

Posting Permissions

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