Batch-script-rd
提供:Dev Guides
バッチスクリプト-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
出力
すべてのアクションは、バッチファイルの説明に従って実行されます。