I was trying to write some stuff in batch files, and was told it would be easier to do what I was trying to do with vb. So I looked into that, and I can understand it enough, but in my search for tutorials to get more into it, they are all about using it in HTML pages. I don't wish to do stuff in HTML pages, I just need to write a few little scripts to do stuff on my XP machine. Where can I find a good tutorial to learn how to write vbscript?

VB Script is for html pages. You might want actual VB programs, which is harder. What is it you want to do? There may be something better out there for you.

VB Script is for html pages. You might want actual VB programs, which is harder. What is it you want to do? There may be something better out there for you.

Well I read in this forum thread that it would make this sort of thing easier. And this microsoft site showed me some of the basics but doesn't mention web pages at all. So I'm a little confused.

Basically what I'm trying to do is write a simple little script that will ping a box on my network repeatedly in 5 or 10 second intervals until it gets a successful reply, then wait another minute or two, then stop. I'm basically going to use it in conjunction with with some backup software I'm using. I wake up this box via WOL (wake on lan) at a certain time of the night, and my backup software starts at this same time. The backup software will run this script and not continue on doing the backup until the script has finished. So if I can creat a script that will say ping the box till it gets a reply, then when it gets a reply, maybe I could have it wait for another minutes or so, then finish. Then the backup software would know it can start backing up to that machine.

Sorry, that was a little long. but that's what I'm trying to do. Do you think I could write a batch file to do this?

Should be able to, sort of.

The ping command probably has parameters to accomplish the first half of the process. As for the wait, I don't know of anything specifically, but one can be written quite easily in C/C++.

So the batch file could be

ping [parameters]
    if errorlevel 1 goto noping
    wait [time]
    backup [parameters]
    goto done
:noping
    rem Machine never answered
:done

The errorlevel line tests whether the previous command exited with success or failure. Don't know if ping does this, though.

Then wait would be a program to simply waits as long as the parameters state. I'm not sure if this will actually be needed. You'd know better. This can easily be written in minutes if you can't locate one on the web.

Finally, start the backup.

Should be able to, sort of.

The ping command probably has parameters to accomplish the first half of the process. As for the wait, I don't know of anything specifically, but one can be written quite easily in C/C++.

So the batch file could be

ping [parameters]
    if errorlevel 1 goto noping
    wait [time]
    backup [parameters]
    goto done
:noping
    rem Machine never answered
:done

The errorlevel line tests whether the previous command exited with success or failure. Don't know if ping does this, though.

Then wait would be a program to simply waits as long as the parameters state. I'm not sure if this will actually be needed. You'd know better. This can easily be written in minutes if you can't locate one on the web.

Finally, start the backup.

Thanks, I think I know how to do the waiting part. I'll take a look at the other stuff you mentioned.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.