Re: Need to exit loop early

Tech-Archive recommends: Fix windows errors by optimizing your registry



Thanks for this - but I am getting the error
Microsoft VBScript compilation error:'loop' without 'do' relating to the
original 'loop' command.

"Björn Holmgren" wrote:

> "Jo Winchester" <JoWinchester@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:B11167CF-A33E-4400-8A42-9FB42B6DABAA@xxxxxxxxxxxxxxxx
> > Hopefully this is a straight forward question.
> >
> > I have a script that reads a file one line at a time, and carries out
> > ceratin actions depending on what it reads on each line. The script uses
> a
> > Do Until....Loop, using
> >
> > Do Until objTextFile.AtEndOfStream
> >
> > Loop
> >
> > I need to add error checking, so that if a set action to be carried out by
> > the script has an err.number <> 0, the loop will ignore the rest of the
> loop,
> > and continue to the next line of the text file that it is reading. So,
> what
> > I need to the command to end one "loop" early, but continue through
> remaining
> > loops. I'm sure it should be really simple, but I don't seem to be able
> to
> > get the syntax right.
>
> Exit Do
>
> --
> Björn Holmgren
>
>
>
>
.



Relevant Pages

  • Re: Testing for loops
    ... I tried this while loop ... > path to a binary than to just specifiy the executable name. ... Try timing a script written ... command in vi, or the abbrev mode in emacs. ...
    (comp.unix.shell)
  • Re: probleme with read command in a loop
    ... >I made a script to remove accentuated characters from a series of file name ... Because the standard input (file descriptor 0) is redirected within ... the loop since your loop is at the end of a pipe-line. ... is the output of the find command from the previous pipe. ...
    (comp.unix.shell)
  • Re: Strange errors
    ... script, or at another point in the loop. ... you can do classin the command window at that ... why does the same exact code not ...
    (comp.soft-sys.matlab)
  • Re: unix pipes to perl scripts
    ... > the loop accepts the piped files but it also interferes with my STDIN! ... The STDIN of your pp script is redirected from the keyboard to the ... STDOUT of the ls command. ...
    (comp.lang.perl.misc)
  • Re: searching synchronously or asynchronously
    ... computer and immediately return to the loop, ... I have the below script. ... Is there a way to run the script, connect to all computers in the command ... If fName NetPath and fName LocalPath and _ ...
    (microsoft.public.scripting.wsh)