7

When I try to delete the file, using the GUI it says

The action cannot be completed because the file is open in another program

And using the del /f /q command line it says

Access is denied

I have tried unlocking the file with Unlocker, as well as trying to locate which process is using the file with the Resource Monitor or the Process Explorer, but no locking handle was found in either case.

I am able to rename or move the file, but not to delete it or change its content.

  • You can't edit/delete it even after copying/moving/renaming? If so, its either virus/antivirus or NTFS file permissions. – PTwr Oct 16 '16 at 20:10
  • I am the owner of the file and have the full read/write permissions of it. And disabling the anti virus doesn't doesn't unlock the file – J. Doe Oct 16 '16 at 23:06
5

We are always glad to help, but just to double-check (since you didn't elaborate), are you certain that this isn't a critical operating system file?

If you are confident that this isn't an essential OS or application file, you can always utilize a Linux Live CD of some type and navigate to the file accordingly. Under those circumstances, it won't be constrained by the Windows operating system and can easily be deleted.

If you are trying to completely delete the Windows.old folder, that is understandably frustrating. I have encountered similar problems following a Windows 10 upgrade, and was finally able to delete it by booting into a command prompt. Try utilizing the following method:

  1. While logged into Windows 10, open the Run window by holding WinKey + R
  2. Type shutdown /r /o /f /t 00 in the subsequent window, then press Enter
  3. After the system reboots, click on Troubleshoot

    Click on Troubleshoot

  4. Click on Advanced Options

    Click on Advanced Options

  5. Click on Command Prompt

    Click on Command Prompt

  6. The ensuing window will ask you to Choose an account to continue

  7. Select a local administrator account, type in the appropriate password, and click on Continue
  8. Within the command prompt, type diskpart and press Enter (as seen below)
  9. In the command prompt, type list volume and press Enter
  10. From the listed volumes, look for and verify the drive letter of your Windows 10 drive.
  11. In the command prompt, type exit and press Enter

    Command Prompt Window

  12. Ensure that you substitute "D" in the command below with the actual drive letter of your Windows drive as displayed from step 10 (above).

  13. To delete the "Windows.old" folder, type RD /S /Q "D:\Windows.old" and press Enter
  14. Close the command prompt window.
  15. Back at the Choose an option window, click on Continue to restart the computer.

(Source: How to Delete Windows.old Folder in Windows 10)

| improve this answer | |
  • It was a file from the Windows.old folder, I ran the Disk Clean-up, which deleted everything in this folder except this file – J. Doe Oct 16 '16 at 23:05
  • That definitely paints a different picture, and I have previously encountered the exact same scenario. I updated my answer with what I did before to solve that problem. – Run5k Oct 16 '16 at 23:23
  • Great that worked! And good job on adding the screenshots that helped – J. Doe Oct 22 '16 at 0:54
  • Glad to hear it! Again, I encountered the exact same scenario after my first Windows 10 upgrade, and that tutorial worked for me, too. – Run5k Oct 22 '16 at 2:15
  • 2
    Thank you, I have an ACER laptop with precious little space and used your method to delete C:\Recovery\Customizations\usmt.ppkg which was 3.4G more than I could afford to spare. I used del vs. rd since it is a file, not a folder. – Oliver Williams Oct 30 '17 at 22:42
0

You can use MoveFile from Microsoft SysInternals utilities.

It allows you to schedule a move or delete at next reboot. The operation will take place before the files are referenced.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.