This happens to me from time to time when I try to rename, move or delete a file or folder, despite the fact that it is NOT currently being used in any program, and it’s somewhat maddening when I’m busy and trying to get work done.
It’s happened to other Windows machines I’ve used over the years, and in the past I used a very handy program called “Unlocker” that showed up in the right-click menu, and once it was invoked, would render the folder or file amenable to whatever I needed to do with it.
But now when I look up ‘Unlocker’ and try to download it, my Antivirus program intercepts it as malware.
I’ve looked up alternate methods to get around this, but they all seem to involve complicated things I don’t want to interrupt my work flow to try, such as closing the offending program in Task Manager or cleaning up my registry. Since I’m always busy when I encounter this, I usually just make a copy of the offending folder or file, do what I need to do, and make a note to delete the original when I restart the next day.
Does anybody else know of either a simple, quick method to fix this, or a reputable program similar to ‘Unlocker’?
Process explorer will let you search for a particular file so you can see which program has it open and kill that handle or resource.
It is not as easy to use as Unlocker, of that I am sure, but it’s direct from Microsoft, so it’s safe (I mean, it will enable you to kill file handles, so not exactly “safe” if you don’t know what you’re doing, but safe enough).
It’s likely to be the BIT service or your AV or Windows Explorer, rather than a application that’s keeping it locked. And your AV is blocking Unlocker because it’s the kind of program that can subvert BITS or AV or Explorer, not because it’s disreputable.
When this happens to me I can usually remember what program I opened the file in. That program usually didn’t close properly. Then I use Task manager to close down that process. (not application, the application is usally closed).
Maybe unlocker is getting flagged incorrectly, but there are alternatives out there. The one I used to use is called LockHunter:
LockHunter is a free 64/32 bit tool to delete files blocked by any processes.
Though that says it deletes, it also had a renaming option, and displays what process has the file or folder open. And it deletes to the Recycle Bin, so you can recover the file if you figure out you shouldn’t have deleted it.
I’ve been cleaning up Win 7 PCs and updating them to Win 10. While deleting user files, Windows will occasionally claim that a file in that folder is open in another program, and I’m unable to delete the folder, even if it is empty.
I just downloaded Unlocker as a test. Worked fine, but I don’t have my security software set to over-the-top (aka default) levels either. You should set the various options in your security software to be in tune with your computing. Maybe you need to allow Unlocker through your firewall. There should be a dialog to set ‘exceptions’ somewhere.
Security software typically comes with default settings that would reject your baby photos if you tried to download them. I suspect it’s all part of the ‘cover your ass’ world we live in whereby everything comes with some sort of caution or warning.
‘Take Ownership’ might be similar to what you’re after. I think it’s part of the free Winaero Tweaker software. You could give that a try. If you do, look under context menu settings and it should be there.
This is the one thing that I still fucking hate after switching from mainly Apple/OSX to Windows 10 a few years ago.
On my Macbook, I can change filenames at will, even if it’s open and running, OSX doesn’t give a shit. Also, there are almost no “illegal” characters in filenames, you can name them pretty much whatever you want.
I’d suspect that, as a form of Unix, macOS uses the same strategy Linux does. Programs are given a handle to a file. And the file is only ever deleted if it has no handles. Otherwise, only the name is changed (for moving/renaming) or removed (for deletion). And, if you edit the file and save it while there’s a handle open, it just saves a second copy.
Since Unix was built to be multiuser from the ground up, it was built with the idea that multiple people might use the same file. And this translates well to multiple processes using the same file.
Unix was built to be multi-process from the ground up. The rather weak multi-user system was grafted on top of the single-user multi-process system. It’s why it’s called unix rather than multix.