Automate "close preview pane before delete, open after delete"

When browsing through folders and cleaning them up, sometimes the process halts due to a preview that is being generated (even if the preview of a temporary copy is set).

Temporarely closing the preview would help. Does it make sense to try to automate this with a button+script?

You shouldn't normally need to. The temporary file copy should be very quick, unless the files are very large.

Which types of files are you seeing that happen with?

I wonder if antivirus might be locking the due to scanning them in reaction to the viewer opening or copying them.

Well it actually happens systematically with xlsx, pptx, pdf (even small ones), ... residing on our sharepoint but even so on locally available files. I'm now on a new and fast machine with latest specs, so I thought the issue would disappear, but it does not.

I've unistalled f-secure, worked with standard defender and now with Bitdefender. It doesn't seem to have impact.

Will try to analyse further, and report later on. Maybe disable the app or the preview from being watched in antivirus.

Is the "open temporary copies" option turned on for each individual type/viewer?

What are the steps that you do which generate the error message? I'll see if I can reproduce it here.