Subject: Then let’s look at the other side of the equation.
I think there’s no problem, if your code deletes the file itself rather than having it deleted by some other process. So, relevant questions:Is it necessary to use the same filepath each time?
Might you try deleting the file with Kill before opening it? Or trapping the error and using Kill then, before you try it again?
Can you arrange to not delete the file in the outside process? E.g. when you’re done you could truncate it instead of deleting?
Trap the error, and create the file by some other means (Open statement perhaps), then try again.
Could you use your imagination to think of alternate workarounds?