Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

批量刪除 Win7 Windows.old 資料夾:RD 命令 + 管理員權限 一鍵清理釋放數 GB 空間

編輯:Windows 7 系統介紹

背景

升級安裝/重裝保留舊系統時產生 `C:\Windows.old` 或 `$WINDOWS.old`,佔用數 GB~數十 GB,**無法直接右鍵刪除** (權限/系統檔案保護/Explorer 崩潰)。

方法一:批次檔 (推薦,可傳遞給他人)

  1. 新建記事本,貼入:
@echo off
rd /s /q C:\Windows.old
:: 或 rd /s /q C:\$WINDOWS.OLD
pause
  1. 另存為 `delold.bat` (編碼 ANSI/UTF-8 均可)。
  2. 右鍵 `delold.bat` → 「以系統管理員身分執行」。
  3. 提示確認刪除目標 → 輸入 `y` → 回車,靜默清理完成。

方法二:直接命令列 (無需建檔)

  1. Win → 輸入 `cmd` → Ctrl+Shift+Enter (管理員模式)。
  2. 輸入:
    rd /s /q C:\Windows.old
    或
    rd /s /q C:\$WINDOWS.OLD
  3. 確認輸入 `y` 回車。

參數解析

  • `rd` = Remove Directory (刪除目錄)。
  • `/s` = 刪除樹狀結構 (含所有子目錄/檔案)。
  • `/q` = 安靜模式 (不逐個確認,僅確認根目錄)。

注意事項

  • **必須管理員權限**,否則「存取被拒」。
  • 刪除前確認 `Windows.old` 內無需保留的個人檔案 (用戶資料在 `Windows.old\Users\用戶名`)。
  • 若有多個舊版本 (如 `Windows.old.000`),同法依次刪除。

總結

**`rd /s /q` + 管理員 CMD** 是刪除 `Windows.old` 最標準、最乾淨、無殘留的系統級方案,批次檔封裝後可一鍵分享給不懂命令列的朋友。

Copyright © Windows教程網 All Rights Reserved