Delete files or folder recursively on Windows CMD

后端 未结 12 1394
悲哀的现实
悲哀的现实 2020-12-02 08:30

How do I delete files or folders recursively on Windows from the command line?

I have found this solution where path we drive on the command line and run this comman

12条回答
  •  执念已碎
    2020-12-02 08:42

    RMDIR path_to_folder /S
    

    ex. RMDIR "C:\tmp" /S

    Note that you'll be prompted if you're really going to delete the "C:\tmp" folder. Combining it with /Q switch will remove the folder silently (ex. RMDIR "C:\tmp" /S /Q)

提交回复
热议问题