0

I'm running a routine delete all files within a folder, then delete the folder. It works, but always seems to leave one file behind. Assume some kind of file lock, but ideas on how to clear the lock would be appreciated.

If I manually delete the 'rogue' file, and rerun the routine the folder is deleted - so all of my folder permissions are correct.

thanks

fso.DeleteFile objFolder & "\*.pdf", true   
fso.DeleteFolder objFolder, true
BigIWT
  • 243
  • 1
  • 5
  • 14

1 Answers1

0

I've located the issue - it was down to a PDF object further up my page. Once I'd set this to 'Nothing' the fso delete command worked a treat. thanks

BigIWT
  • 243
  • 1
  • 5
  • 14