if then endif , other smart solution in place of if then ....
- by yael
I have the following VB script
How to write this VB script with case syntax? In order to perform professional writing in place if then….
yael
Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FileExists("C:\file1 ")) Then
Verification=ok
Else
WScript.Echo("file1")
Wscript.Quit(100)
End If
If (fso.FileExists("C:\file2 ")) Then
Verification=ok
Else
WScript.Echo("file2")
Wscript.Quit(100)
End If
If (fso.FileExists("C:\file3 ")) Then
Verification=ok
Else
WScript.Echo("file3")
Wscript.Quit(100)
End If
.
.
.
.