Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Deleting a folder after unzipping
#1
Not Solved
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

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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Executing via create "RES"xx folder? nishitd 0 1,245 03-07-2018, 01:09 AM
Last Post: nishitd
  code for validation to create a sub folder smiley 0 1,541 10-19-2016, 10:08 PM
Last Post: smiley
  [UFT] Close opened folder robertosalemi 1 3,335 02-10-2016, 07:06 PM
Last Post: robertosalemi
  Run scripts from folder badri 1 2,819 11-26-2014, 06:18 PM
Last Post: vinod123
  Folder dineshreddymca 0 2,234 03-08-2013, 09:50 AM
Last Post: dineshreddymca

Forum Jump:


Users browsing this thread: 1 Guest(s)