IsWriteable incorrect

I echo Norm’s advice.

Try to create a file of the right name, wrapped inside a try…catch
If you get an exception, handle that.
I started doing that because of trouble I was having with PDF files held ‘open’ by Adobe, and CSV files held ‘open’ by Excel.

Similarly, I wrap DELETES in a try catch, and then test for f.exists afterwards too.

#trustnoone