Impossible to delete a file in Windows 7 (2)
Solution 1
For files that are locked by another open process, I had most success using Unlocker.
Just be careful when installing it, because the developer chose to add a toolbar installation to the install process. Just select "Advanced" in the installation and uncheck all the options.
After installed, just right-click the file and select "Unlocker". You'll see all the process current using the file. All you have to do is select the "Erase" option in the selection box and click "Unlock All".
Solution 2
Since the file is in use by the system process (ID=4), you cannot kill it to free the lock.
Boot from a live CD of your choice (ubuntu for instance), and mount your hard disk. delete the file, and reboot into windows.
Solution 3
In the past I've used Process Explorer to find the handle that is preventing a delete. Download it here: http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx
Open it up and hit "Find" and then "Find Handle or DLL"
You can probably just type iso in the search box. If it finds a program using the iso highlight it and then you'll see it appear in the main window on the lower section. From there just right click the handle and choose close. Worked for me in the past so hopefully it helps you.
Cheers!
Solution 4
This process is being run under system process. What you can do is use psexec from: http://technet.microsoft.com/en-us/sysinternals/bb896649.aspx
Then start cmd under system account: psexec -i -s cmd
After that you can use interactive cmd shell to kill the process that is having a lock on the file: taskkill /PID 4, if this fails you can try adding /F (force) switch.
And you delete the file: del /F .\ArcGIS_Desktop_101_129026.iso
This is a "brute force" method so hopefully you know what you are doing.
Related videos on Youtube
geotheory
Researcher of GIS, spatial analysis and urban studies at the Centre for Advanced Spatial Analysis, University College London.
Updated on September 18, 2022Comments
-
geotheory over 1 year
I'm aware of similar posts on this, but they haven't fixed my issue. I have an
.iso
installation file previously mounted with MagicDisc that I am now unable to delete. I have of course unmounted the file and shut down MagicDisc. I've also rebooted in safe mode, tried deleting with Administrator privileges, tried deleting by command line, and nothing works. Very grateful for suggestions on how to retire this resilient file.In Explorer the error message is:
By command line the error is:
PS C:\users\Robin\Downloads> del .\ArcGIS_Desktop_101_129026.iso del : Cannot remove item C:\users\Robin\Downloads\ArcGIS_Desktop_101_129026.iso: The process cannot access the file 'C:\users\Robin\Downloads\ArcGIS_Desktop_101_129026.iso' because it is being used by another process. At line:1 char:1 + del .\ArcGIS_Desktop_101_129026.iso + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : WriteError: (C:\users\Robin\..._101_129026.iso:FileInfo) [Remove-Item], IOException + FullyQualifiedErrorId : RemoveFileSystemItemIOError,Microsoft.PowerShell.Commands.RemoveItemCommand PS C:\users\Robin\Downloads> del *.iso del : Cannot remove item C:\users\Robin\Downloads\ArcGIS_Desktop_101_129026.iso: The process cannot access the file 'C:\users\Robin\Downloads\ArcGIS_Desktop_101_129026.iso' because it is being used by another process. At line:1 char:1 + del *.iso + ~~~~~~~~~ + CategoryInfo : WriteError: (C:\users\Robin\..._101_129026.iso:FileInfo) [Remove-Item], IOException + FullyQualifiedErrorId : RemoveFileSystemItemIOError,Microsoft.PowerShell.Commands.RemoveItemCommand PS C:\users\Robin\Downloads>
Appendum
-
Frank Thomas over 10 yearstry searching for the file in Process Explorer and see what process has it locked. if its not a system process you may be able to kill it, delete the file, and reboot.
-
geotheory over 10 yearsI assume you mean in Task Manager. I'm not sure how to identify which process is using the file. The
iso
doesn't appear itself anywhere (even withShow processes from all users
ticked andSystem
processes being visible. -
Ƭᴇcʜιᴇ007 over 10 yearsOut of all the answers on the "similar posts" you went through, exactly what did you try already?
-
Ƭᴇcʜιᴇ007 over 10 years
-
geotheory over 10 yearsThe one linked above and this. The others seem not to apply for one reason or another. The preferable solution would be to kill the process using it.
-
geotheory over 10 yearsThat's a bit lazy @techie007. It can't be a duplicate of all of these. So make your case against a specific one, and if it is I'll close the question.
-
Ƭᴇcʜιᴇ007 over 10 yearsThe first one is what I chose to mark it as a duplicate of, the others are related/dupes for your reference. Sorry if you think that's being "lazy".
-
Ramhound over 10 years@geotheory - This problem isn't unique to a specific version of Windows. Besides you don't get to decide if its a duplicate the community does. Have you used Process Explorer to determine what process is preventing you from removing the file? I see no mention of you using any tools in you question, responses to comments might, but the question should have the information also.
-
Ƭᴇcʜιᴇ007 over 10 yearsAs I asked back a while ago, explain exactly what you've tried already, and what your results were. So far, all the answers given here are in the (various) questions marked as possible duplicates; if you can show us that nothing else in those dupes covers your situation then it might be worth leaving open.
-
geotheory over 10 years@Ramhound point taken about community decision. But despite this not being unique, it seems to me a bit unreasonable to expect everyone to assume that's the case. techie007 please be my guest and vote to close it.
-
slhck over 10 yearsJust FYI, we close questions as duplicates in order to point people to an answer. Not necessarily because they're absolutely the same questions. Since Unlocker solved it for you, and it's mentioned all over the place, I think we can safely close this…
-
geotheory over 10 yearsThen you perhaps may want to flag up there about the additional spy/bloatware issue with Unlocker.
-
-
geotheory over 10 years
0 matching items
sorry @mark-brak no luck with this method (although the software does look handy) -
Frank Thomas over 10 years@geotheory: did you run process explorer as admin, and confirm that its showing processes from all users?
-
geotheory over 10 yearsActually as admin it does find the file (see appendum image above). But killing the process still fails (same error message), and right-clicking the file in the window below and choosing
Close Handle
returns the errorError opening process: the handle is invalid
. Any further suggestions? -
Ramhound over 10 yearsThis seems like the best option.
-
mark brak over 10 yearsIf you pop in your Windows 7 disc you can boot into the repair menu and delete the file from the command prompt. Here is a step by step to boot to this menu. The command prompt part finally appears in step 7. This will save you from having to download a linux boot cd. pcsupport.about.com/od/toolsofthetrade/ss/…
-
geotheory over 10 yearsAlready fixed now, but this looks handy in future. Much preferable to installing software solutions - unlike the spyware that has just infected my system :(
-
geotheory over 10 yearsYour link is a 404
-
geotheory over 10 yearsI did in the end use this solution, but I didn't get an option to not install the toolbar stuff, and I have ended up with spyware attack. Nevertheless it has removed the file.
-
Ramhound over 10 years@geotheory - I don't believe the real Unlocker file has spyware connected to it. Where did you download it from exactly?
-
JoselitoBanzai over 10 yearsI'm really sorry to hear that, I should not have recommended any software that contains Malware in the installation. I did however uninstall and reinstall Unlocker just to make sure there was a way to not install the toolbar, it was on the third page of the installation. I suppose I'll not be recommending it anymore. I've been using it for years, but just recently noticed they added the toolbar install. I'll install the toolbar on a VM machine and see if i can find a good tutorial to remove it.
-
geotheory over 10 yearsNow not sure where, probably the same place as this chap because I got the same 'Delta' software. Subsequent virus check then found 3 spyware files, although I guess strictly speaking I've now deleted any evidence of their origin.
-
geotheory over 10 yearsThe process outlined by 'gringo_pr' here seems to have done a pretty good job of cleaning my system.
-
fig over 6 yearsStill says "Access is denied" for me :(
-
user10089632 over 6 yearsThat link, generated the following message from Bitdefender : Reported Unwanted Software Page! This web page at www.emptyloop.com has been reported to contain unwanted software and has been blocked based on your security preferences. Unwanted software pages try to install software that can be deceptive and affect your system in unexpected ways.
-
Jason about 5 yearsInteresting ideas, but System process cannot be killed, and psexec under System still could not delete the file...