mishcondereya
asked on
VBS Script DOES NOT EXIST
Hello
I've got a bit of script that basically says, if this file exists then exit the script. What amendment would I have to make to the below script so it says if the file DOESN'T exist then exit?
Thanks in advance.
I've got a bit of script that basically says, if this file exists then exit the script. What amendment would I have to make to the below script so it says if the file DOESN'T exist then exit?
Thanks in advance.
If oFSO.FileExists(sProfilePath & "\" & sUserName & "\ntuser.dat") Then
' WScript.Echo "Roaming profile exists..."
WScript.Quit(0)
End If
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
sirBounty is right
Here is an example to respond to either case
zf
zf
set oFSO = CreateObject("Scripting.FileSystemObject")
If oFSO.FileExists(sProfilePath & "\" & sUserName & "\ntuser.dat") = True Then
MsgBox "File Found"
Else
MsgBox "File Not Found"
End If