if then endif , other smart solution in place of if then ....

Posted by yael on Stack Overflow See other posts from Stack Overflow or by yael
Published on 2010-06-13T14:25:49Z Indexed on 2010/06/13 14:32 UTC
Read the original article Hit count: 184

Filed under:

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

. . . .

© Stack Overflow or respective owner

Related posts about vbscript