Win10 cannot delete folder and I am the owner and administrator and everything else

I only copied one folder node_modules from D:/some_folder/node_modules to C:/another_folder/node_modules and now cannot delete C:/another_folder/node_modules. It says I need administrative privileges.

I am the owner.

I am the administrator.

I've tried few command lines I found here like this one: and rmdir /s /q C:\ProgramData\FolderToDelete this one, but nothing is working. I looked in process explorer and I see nothing about the folder.

What else can I try?

6

1 Answer

Attempt to delete the folder in question from an Elevated Command Prompt from a Safe boot.

For the non-tech-savvy, you may want to write down or print these instructions out before proceeding.

  1. Press ⊞ + R, type "msconfig" without the quotes, and press Enter
  2. Switch to the "Boot" tab, check the "Safe boot" checkbox, and leave it set to Minimal.
  3. Hit "Apply", hit "OK", and restart the computer.
  4. The system will boot into Safe Mode, loading only necessary processes and services.
  5. Press ⊞ + R, type "cmd" without the quotes, Hold CTRL + SHIFT, and while holding CTRL + SHIFT, press Enter. This will open an elevated command prompt with administrator privileges.

Alternatively, for step 5 you can Right-click the Start Button on your task bar, and >Select "Windows Powershell (Admin)", although powershell has differences from cmd.

  1. Attempt to run the command rmdir /s /q C:\path\to\FolderToDelete where the last part is the path to your actual desired directory to remove. Be warned that this will delete the directory, as well as any directories or files inside of it!

Once you have resolved the problem, follow steps 1, 2, and 3 again, with the exception of UNCHECKING "Safe boot" instead of checking it. This will get your system back into a normally booting situation.

4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like