15 thoughts on “How to Delete a Directory (Folder) from the Command Prompt”

  1. Hello, recently I made the mistake of copying most of my C drive onto my desktop, long story, at any rateI was able to delete the majority if the folder so its not taking up alot of space, however there is a small portion that remains and so the offending folder stayed,
    something about windows needing administrator privileges to delete this folder yada yada, so using the admin credentials i try this, asks for the same thing, so I run Command prompt as an administer and try to run the above command, RD /S /Q C:\Users\Desolator\Desktop\C
    and i get a notice “: access is denied.” for each of the remaining folders.
    is there a way around this?
    Thanks

  2. but I applied the same command in Windows 10, and command prompt show the message that a given directory is not empty.
    what should I do please. If you have another procedure in your mind.

  3. Thanks so much! I had a problem where I no longer needed a folder so I tried to delete it, but it wouldn’t let because it said that the files in it were currently being used by another program, but they weren’t; there were no other tabs open. So I tried to go into the CMD and use the command “del (folder name)”, but it still didn’t work, so I needed some way to just force it off of the hard drive regardless of any circumstances, because I have OCD, and the folder really bothered me by it being there, so I found this, tried it out, and it actually worked! Quite honestly, I didn’t think it would. But, it did, so, thanks so much!

  4. Thanks there was a virus installed on a hidden folder where it said there were no folders, so i then went with cmd to the path of the virus and deleted the fiolder it was in, thanks 😉

    1. /S Removes all directories and files in the specified directory
      in addition to the directory itself. Used to remove a directory
      tree.

      /Q Quiet mode, do not ask if ok to remove a directory tree with /S

  5. My user name is THANK YOU and it says invalid switch please correct as this is the code i used to delete a game file
    RD /S /Q Local Disk (C:)/Users/THANK YOU/DownloadsSTEM/steamapps/common/Unturned/Bundles/Workshop/Maps/France

  6. This was incredibly useful for me trying to uninstall Phantasy Star Online 2, which has been infamously problematic with installs and uninstalls since it’s recent US launch on the Windows Store. Thank you!

    This is the command that appears to have solved my problems: RD /S /Q “pso2_bin”

  7. Hi

    i unable delete the file.im getting below error

    C:\Users\Administrator>RD /S /Q D:\NP DATA BACKUP\2016-11\B4\C
    The system cannot find the file specified.
    The system cannot find the file specified.
    The system cannot find the path specified.

  8. Command is not working its showing access denied.
    How i can delete these file any idea please.
    C:\Windows.old\Windows\ShellExperiences\PeopleCommonControls.dll – Access is denied.
    C:\Windows.old\Windows\ShellExperiences\PeoplePane.dll – Access is denied.
    C:\Windows.old\Windows\ShellExperiences\QuickActions.dll – Access is denied.
    C:\Windows.old\Windows\ShellExperiences\QuickConnectUI.dll – Access is denied.
    C:\Windows.old\Windows\ShellExperiences\ScreenClipping.dll – Access is denied.
    C:\Windows.old\Windows\ShellExperiences\SharePickerUI.dll – Access is denied.
    C:\Windows.old\Windows\ShellExperiences\ShoulderTapView.dll – Access is denied.
    C:\Windows.old\Windows\ShellExperiences\StartUI.dll – Access is denied.
    C:\Windows.old\Windows\ShellExperiences\TileControl.dll – Access is denied.
    C:\Windows.old\Windows\ShellExperiences\VirtualTouchpadUI.dll – Access is denied.
    C:\Windows.old\Windows\ShellExperiences\Windows.UI.ActionCenter.dll – Access is denied.
    C:\Windows.old\Windows\ShellExperiences\Windows.UI.SoftLanding.dll – Access is denied.
    C:\Windows.old\Windows\ShellExperiences\WindowsInternal.People.PeoplePicker.dll – Access is denied.
    C:\Windows.old\Windows\ShellExperiences\WindowsInternal.People.Relevance.dll – Access is denied.
    C:\Windows.old\Windows\ShellExperiences\WindowsInternal.People.Relevance.QueryClient.dll – Access is denied.
    C:\Windows.old\Windows\SKB\LanguageModels\lm.en-001.dat – Access is denied.
    C:\Windows.old\Windows\SKB\LanguageModels\lm.en-AU.dat – Access is denied.
    C:\Windows.old\Windows\SKB\LanguageModels\lm.en-CA.dat – Access is denied.
    C:\Windows.old\Windows\SKB\LanguageModels\lm.en-GB.dat – Access is denied.
    C:\Windows.old\Windows\SKB\LanguageModels\lm.en-grammar.dat – Access is denied.
    C:\Windows.old\Windows\SKB\LanguageModels\lm.en-US.dat – Access is denied.
    C:\Windows.old\Windows\SKB\LanguageModels\lm.en.dat – Access is denied.

Leave a Reply

Your email address will not be published. Required fields are marked *