
- 批處理指令碼教程
- 批處理指令碼 - 主頁
- 批處理指令碼 - 概述
- 批處理指令碼 - 環境
- 批處理指令碼 - 命令
- 批處理指令碼 - 檔案
- 批處理指令碼 - 語法
- 批處理指令碼 - 變數
- 批處理指令碼 - 註釋
- 批處理指令碼 - 字串
- 批處理指令碼 - 陣列
- 批處理指令碼 - 決策制定
- 批處理指令碼 - 運算子
- 批處理指令碼 - 日期和時間
- 批處理指令碼 - 輸入/輸出
- 批處理指令碼 - 返回程式碼
- 批處理指令碼 - 函式
- 批處理指令碼 - 程序
- 批處理指令碼 - 別名
- 批處理指令碼 - 裝置
- 批處理指令碼 - 登錄檔
- 批處理指令碼 - 網路
- 批處理指令碼 - 列印
- 批處理指令碼 - 除錯
- 批處理指令碼 - 日誌記錄
- 批處理指令碼資源
- 批處理指令碼 - 快速指南
- 批處理指令碼 - 有用資源
- 批處理指令碼 - 討論
批處理指令碼 - RD
此批處理命令刪除目錄,但目錄必須為空才能刪除。
語法
rd [directoryname]
示例
以下示例顯示了 rd 命令的不同變體。
@echo off Rem removes the directory called newdir rd C:\newdir Rem removes 2 directories rd Dir1 Dir2 Rem Removes directory with spaces rd "Application A" Rem Removes the directory Dir1 including all the files and subdirectories in it rd /s Dir1 Rem Removes the directory Dir1 including all the files and subdirectories in it but asks for a user confirmation first. rd /q /s Dir1
輸出
所有操作均按批處理檔案中的備註執行。
batch_script_commands.htm
廣告