Batch-script-rd

提供:Dev Guides
2020年6月23日 (火) 09:41時点におけるMaintenance script (トーク | 投稿記録)による版 (Imported from text file)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先:案内検索

バッチスクリプト-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

出力

すべてのアクションは、バッチファイルの説明に従って実行されます。