10-17-2011, 11:04 PM
I am trying to write a script for my company. I got everything done except for after I have the program download the zip file and unzip the folder, it runs the setup in the folder after that is done it deletes the zip file but it will not delete the folder. Instead states "Permission Denied." I have tried the following:
Try #1
Try #2
I am using QTP 10. Now if I unzip the file, it does delete. Now this folder is large about 750 MB which is the reason I want to delete it.
Please help
Try #1
Code:
Dim fso2
Set fso2 = CreateObject("Scripting.FileSystemObject")
Set fldr= fso2.DeleteFolder(ExtractTo)
Try #2
Code:
Dim objFSO3
Set objFSO3 = CreateObject ("Scripting.FileSystemObject")
objFSO3.DeleteFolder ExtractTo,True
I am using QTP 10. Now if I unzip the file, it does delete. Now this folder is large about 750 MB which is the reason I want to delete it.
Please help