Batch-script-move

提供:Dev Guides
移動先:案内検索

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

出力

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