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

Checking weather the File is available or not, if available delete theFile in QTP Checking weather the File is available or not, if available delete theFile in QTP Reviewed by Animesh Chatterjee on January 24, 2010 Rating: 5

No comments:

Powered by Blogger.