mrdecrypter
IS-IT--Management
Here is an example of what i am trying to do:
getoutput("findstr.exe ""test"" c:\test.txt")
function getoutput(app)
If lcase(getoutput) = "" Then
msgbox("Found")
else
msgbox("Not Found")
end if
end function
this may be a totally broken approach at trying to use an If Then statement in vbscript. All im simply trying to do is search a text file for a specific string, and if it does or doesnt find the text then 'do something'....i know how to do it in DOS with simple findstr and %errorlevel% returns, but vbscript is kicking my rear on it. This one is probably real simple for you experts. any help?
getoutput("findstr.exe ""test"" c:\test.txt")
function getoutput(app)
If lcase(getoutput) = "" Then
msgbox("Found")
else
msgbox("Not Found")
end if
end function
this may be a totally broken approach at trying to use an If Then statement in vbscript. All im simply trying to do is search a text file for a specific string, and if it does or doesnt find the text then 'do something'....i know how to do it in DOS with simple findstr and %errorlevel% returns, but vbscript is kicking my rear on it. This one is probably real simple for you experts. any help?