windowswindows-xpfile-management

What's the fastest way to delete a large folder in Windows?


I want to delete a folder that contains thousands of files and folders. If I use Windows Explorer to delete the folder it can take 10-15 minutes (not always, but often). Is there a faster way in Windows to delete folders?

Other details:


Solution

  • Using Windows Command Prompt:

    rmdir /s /q folder
    

    Using Powershell:

    powershell -Command "Remove-Item -LiteralPath 'folder' -Force -Recurse"
    

    Note that in more cases del and rmdir wil leave you with leftover files, where Powershell manages to delete the files.