Reputation: 159
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 ?
Upvotes: 3
Views: 15380
Reputation: 1
regedit
in Start Search or command prompt. In Registry Editor, navigate to the following registry key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System
DWORD
registry subkey in the right pane: EnableLUA
EnableLUA
On value prompt, set value to 0
. EnableLUA
to 1
.Upvotes: 0
Reputation: 79
You are using a library written in another language to extract the files? Verify that any pointer was open, it is likely that some file is opened, good luck!
Upvotes: 0
Reputation: 18135
Perhaps one or more of the files is read-only? Use the optional force parameter to force deletion:
f.DeleteFolder (path + "Extracted Files"), True
Upvotes: 6