Zum Inhalt

Windows 使用指令刪除資料夾與檔案

Windows 使用指令刪除資料夾與檔案

使用 rd 指令

單存使用 rd 只能刪除空的資料夾,必須要加入參數 -s 才能刪除資料夾與裡面的所有東西(目錄樹)。

rd 指令詳細解說:https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/rd

使用 del 指令

del 刪除特定檔案,若目標為資料夾,則刪除資料夾內所有檔案,刪除後無法復原。

加上參數 -s 會確認是否刪除每個子目錄裡的檔案,並在顯示被刪除後的檔案名稱

del 指令詳細解說: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/del

 

Schlagwörter:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.