Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I end the script early 1

Status
Not open for further replies.

mark01

Technical User
Jan 17, 2001
600
US
I have a script, that check's for a file at the first. If the file exists, then I want the script to end. If not then it continues on down the script. I can't think of the command to stop it. This is what I want to do...

if fso.fileexists "c:\test.txt" then
end
else
end if
 
Hello mark01,

Code:
if fso.fileexists("c:\test.txt") then
    wscript.quit
else
'other stuff
end if
regards - tsuji
 
WScript.Quit(nInt)

Where nInt is an integer exit value or is empty

[blue]"Well, once again my friend, we find that science is a two headed beast. One head is nice, it gives us aspirin and other modern conveniences,...but the other head of science is BAD! Oh, beware the other head of science, Arthur; it bites!!" - The Tick[/blue]
 
If it helped you out and saved you time, then you should give tsuji a star. (His solution was more informative than mine)

[blue]"Well, once again my friend, we find that science is a two headed beast. One head is nice, it gives us aspirin and other modern conveniences,...but the other head of science is BAD! Oh, beware the other head of science, Arthur; it bites!!" - The Tick[/blue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top