Set fso = CreateObject("Scripting.FileSystemObject") Const ForReading = 1, ForWriting = 2, ForAppending = 8 Set tso = fso.OpenTextFile("del.txt", ForWriting, true) tso.Close Set tso = Nothing If fso.FileExists("del.txt") Then WScript.Echo "del.txt file found." Else WScript.Echo "del.txt file not found." End If fso.DeleteFile("del.txt") If fso.FileExists("del.txt") Then WScript.Echo "del.txt file found." Else WScript.Echo "del.txt file not found." End If Set fso = Nothing