tags:

views:

2776

answers:

4

Hi, I am using VB6. The tool that i have created extracts few zip files and unzips them onto a folder that i create locally.In the clean up part of my code, i have deleted the folder using this code

If (f.FolderExists(path + "Extracted Files") = True) Then
     f.DeleteFolder (path + "Extracted Files")
End If

When i run this code, i get an error Run Time Error '70' and Permission Denied in the line f.DeleteFolder(path + 'Extracted Files').

Where am i going wrong ? Or do i need to create the folder with a different permission ?

A: 

Do you still have one of the files in this folder open in your code somewhere?

David M
A: 

no i do not have any of the files from that folder open

+2  A: 

Perhaps one or more of the files is read-only? Use the optional force parameter to force deletion:

f.DeleteFolder (path + "Extracted Files"), True
raven
A: 

hey raven, thanks for that suggestion !!!! it seems to have worked !!!

Mahesh N Kini