DblTMO
asked on
delete file permission denied using vb6
I am trying to Delete a text file but keep getting a permission denied error. I can Copy it but cannot Move or Delete it.
ASKER
I am the owner. I am Importing the file into Access then St the FSO = Nothing. After that I need to Copy the file to a Backup directory. After the Copy I need to Delete the orginal.
You can delete using command prompt if you have any issues with deleting using Explorer.
1. Open command prompt
2. type this below command. I have used c:\windows\test.tmp as example file you want to delete:
del /f /q c:\windows\test.tmp
This should work!
Cheers
1. Open command prompt
2. type this below command. I have used c:\windows\test.tmp as example file you want to delete:
del /f /q c:\windows\test.tmp
This should work!
Cheers
Try this:
Dim FSO As Object
Set FSO = CreateObject("Scripting.Fi leSystemOb ject")
FSO.DeleteFile "FileToBeDeleted", True
Dim FSO As Object
Set FSO = CreateObject("Scripting.Fi
FSO.DeleteFile "FileToBeDeleted", True
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If in use , try to find the owner of the file and close that connection.
regards
Oldelphi