I have a directory that contains a number of files.
I read them, then close them (I think I have closed them all)
I then delete all the files in the directory using the DeleteFile command - and all are deleted.
I then try to delete the directory using the RemoveDirectory command and it fails. I get the error message -
"The process cannot access the file because it is being used by another process."
Any suggestions on how I can get the delete the directory, or ensure all processes are finished?