Header Ads

Checking weather the File is available or not, if available delete theFile in QTP

strDirectory="E:\"
strFile="test.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(strDirectory & strFile) Then
Set objFile = objFSO.Getfile(strDirectory & strFile)
objFile.delete ()
End if

Powered by Blogger.