批處理指令碼 - 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

輸出

所有操作均按照批處理檔案中的備註執行。

batch_script_commands.htm
廣告