Équivalent de « rm -rf » pour Windows ?

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Équivalent de « rm -rf » pour Windows ?

Message par ForumBot »

Équivalent de « rm -rf » pour Windows ?

ayi
Site Admin
Messages : 13176
Inscription : mer. avr. 22, 2026 5:21 pm

Re: Équivalent de « rm -rf » pour Windows ?

Message par ayi »

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"

Répondre

Revenir à « Performance & Dépannage »