Deleting open pdf does not give warning

I am using Opus 12.15 on win10 on 64 bit machine. When I try to delete a file that is open, Opus properly gives me a warning that says the action can't be completed because the file is open. However, if the file I am trying to delete is a pdf, Opus asks me if I really want to delete it, I say yes, and it does nothing. Nothing is deleted, no warning is given. The warning works fine on word, excel, ppt files.

Curiously, on other file types I have tried, txt and jpg, it delete the file EVEN though I have it open in another program.

I have tried this on two different PCs with the same results.

Thank you.

It depends how the program that has the document open has locked the file (if at all).

Some programs load some files into memory entirely and then close the files. (Or they might make a copy and open that.) With those, the file is not technically open in anything and nothing prevents it from being deleted.

Some keep the file locked and may only read parts of it at a time, so they need the file to remain around and block it from being deleted.

There isn't a warning about files being open when you try to delete them; there is an error message if you try to delete a file and it fails because another program has locked the file such that it cannot be deleted.

There is also a third possibility where a program keeps a file open, but also tells Windows that it's OK to delete the file. If something (e.g. Opus or File Explorer) then asks to delete the file, the deletion will succeed and there is no error, but the file will still be there until the other program closes it. That situation is fairly rare, but there is some software which opens files in that way. That might be what you are seeing.

All of this is unrelated to file types (PDF, Word Doc, etc.). It's entirely down to how and whether the file is being held open and locked by other software when you ask to delete it.

Thank you for the very quick and explanatory reply. But I am still confused over one thing. You say in para 3 that if you try to delete a file and it fails because another program has locked the file, you should get an error message. And what I see with pdfs is that the file is NOT deleted (i.e., the deletion does no succeed) and there is NO error message. I found it quite confusing the first few times it happened until I realized what was going on.

From what you write, it would appear that the pdf is locked in some way, Opus cannot delete it, and thus I would expect an error message of some sort.

I'm confused.

That may be due to :point_down: