What ever happened to deltree, and what's its replacement?

前端 未结 10 1886
终归单人心
终归单人心 2020-12-04 23:28

In earlier versions of MS-DOS - I want to say version 7, but I could be wrong - there was a deltree command, which recursively deleted all subdirectories and fi

相关标签:
10条回答
  • 2020-12-04 23:40

    It was replaced with the commands: RMDIR or RD

    Delete all subdirectories with /S

    Use it quietly with the /Q

    Example:

    RMDIR /S /Q Folder2Delete
    RD /S /Q Folder2Delete
    

    Documentation:

    • DELTREE at Wikipedia
    • RMDIR at Wikipedia
    • RMDIR at Microsoft
    0 讨论(0)
  • 2020-12-04 23:41

    Actually RMDIR and RD commands in modern Windows operating system merge both the commands RD and Deltree of Win 98 in a single command. It's an internal command that's why you won't find any RD.exe and RMDIR.exe.

    By typing this "RD /?" in cmd without double qoutes you'll get exactly what you want.

    0 讨论(0)
  • 2020-12-04 23:46

    Nowadays, you can use Powershell to do the same task:

    powershell -Command "Remove-Item 'PathToMyDirectory\*' -Recurse -Force"
    
    0 讨论(0)
  • 2020-12-04 23:54

    to delete a directory and all it's contents recursively

    rd /s MY_DOOMED_DIR
    
    0 讨论(0)
提交回复
热议问题