SHARE
TWEET

Untitled

a guest Dec 6th, 2019 98 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. strComputer = “.”
  2. Set objWMIService = GetObject(“winmgmts:\\” & strComputer & “\root\cimv2”)
  3.  
  4. Set colFiles = objWMIService.ExecQuery _
  5.     (“Select * From CIM_Datafile Where Name = ‘C:\\Scripts\\Test.txt'”)
  6.  
  7. If colFiles.Count > 0 Then
  8.     Wscript.Quit
  9. Else
  10.     Wscript.Echo “The file does not exist.”
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top