chris-uk-lad
Registered User.
- Local time
- Today, 13:57
- Joined
- Jul 8, 2008
- Messages
- 271
Hi,
When i run a piece of code to run through subfolders finding files that arent named after the subfolder, and delete them, i hit a problem. An error says 'permission denied' when it hits this line, BUT if i then open the file, close it, then run again, it will delete it :x
Any tips?
When i run a piece of code to run through subfolders finding files that arent named after the subfolder, and delete them, i hit a problem. An error says 'permission denied' when it hits this line, BUT if i then open the file, close it, then run again, it will delete it :x
Code:
For Each f1 In f
If f1 <> subF1.Path & "\" & subF1.Name & ".tif" Then
fso.DeleteFile f1
End If
Any tips?