Batch-script-move

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

バッチスクリプト-MOVE

このバッチコマンドは、ディレクトリ間でファイルまたはディレクトリを移動します。

構文

move [source] [destination]

ファイルはソースから宛先の場所にコピーされます。

次の例は、moveコマンドのさまざまなバリエーションを示しています。

@echo off
Rem Moves the file list.txt to the directory c:\tp
move C:\lists.txt c:\tp
Rem Renames directory Dir1 to Dir2, assuming Dir1 is a directory and Dir2 does not exist.
move Dir1 Dir2
Rem Moves the file lists.txt to the current directory.
move C:\lists.txt

出力

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