Équivalent de « rm -rf » pour Windows ?

Équivalent de « rm -rf » pour Windows ?

RMDIR ou RD si vous utilisez l’invite de commandes classique (cmd.exe) :

rd /s /q "path"

RMDIR [/S] [/Q] [drive:]path

RD [/S] [/Q] [drive:]path

/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

Si vous utilisez PowerShell, vous pouvez utiliser Remove-Item (which is aliased to del, erase, rd, ri, rm and rmdir) and takes a -Recurse argument that can be shorted to -r

rd -r "path"