How come my files (not locked files to run the computer) get locked and
how to scan them or delete them?
Files can get locked for many reasons; the most common being that some other
program simply has the file open for some reason.
In this video excerpt from a recent Ask Leo! webinar,
I’ll discuss some of the ramifications of locked files, how to tell who’s doing
the locking, and what steps are appropriate to deal with it.
Become a Patron of Ask Leo! and go ad-free!
How come my files (not locked files to run the computer) get
locked and how to scan them or delete them?
It depends on how you’re determining how they are locked. The scenario that
I actually have an article on is this concept of a file being in use.
When one application has a file open, depending on how that application has
opened the file, it can actually cause the file to be locked. It can be locked
in several different ways, but the most basic way is that the file cannot be
deleted until that program actually lets go of it.
In this particular case, you can see that I bring up…we’ve got MoveOnBoot
here; there’s another article I believe that will show you who’s using it and
let’s see, ‘Who can I see is using the file?’ Yea, that’s the one I was looking
This uses Process Explorer (or procexp) and you can use a ‘Find’ on Process
Explorer on the filename you are having trouble deleting and it will show you
all of the applications that are using it. So in this example on the screen
here, I took a look at the time for personal.pst which at the time was my email
folder that I was using with Outlook. And for just searching for personal.pst in
procexp, it showed me that Outlook.exe was the program file open and that I
could close Outlook.exe and of course, the file was no longer being reference by
anybody and I could do whatever I wanted to it.
I believe my assistant Mark has a favorite utility that he keeps pointing at
and if he types it in here real quick before I’m done with the question, I’ll
mention it. Basically, there are several different applications that will
attempt to identify who’s got a file open and in some cases, are able to unlock
the file forcefully. Unlocker Assistant is the name of the tool.
They’re able to unlock the file forcibly from underneath the program that
happens to have it open so that the file can then be deleted or closed. It may
very well confuse that program that thought it had it open, but in most cases,
if you’ve come to this kind of situation, that’s not necessarily a bad place to
be because clearly you’re running in to some kind of a problem.
But in general, programs that have files open, the important thing to
understand is what program is it that has the file open; is it a program you
recognize? Should it be using that file? If it is, you probably want to leave it
alone. If it’s not, then you probably want to take some additional and more
And when you say, ‘…how to scan them or delete them,’ I’m not necessarily sure what
you mean by scan. If you’re concerned about your anti-virus program not being
able to scan it, I would probably suggest you look into another anti-virus
program because as it turns out, there are…most anti-virus programs out there
now make use of the same facilities as the backup software uses that allows
them to at least read the contents of a file while it’s being used. It says
‘volume shadow copy’; I think it is.
So that file, even though it might be in use, can be backed up and that same
technology can be used by the anti-virus tool to at least scan the contents of
the files and understand whether or not there are viruses inside them.