
- 批處理指令碼教程
- 批處理指令碼 - 主頁
- 批處理指令碼 - 概述
- 批處理指令碼 - 環境
- 批處理指令碼 - 命令
- 批處理指令碼 - 檔案
- 批處理指令碼 - 語法
- 批處理指令碼 - 變數
- 批處理指令碼 - 註釋
- 批處理指令碼 - 字串
- 批處理指令碼 - 陣列
- 批處理指令碼 - 決策制定
- 批處理指令碼 - 運算子
- 批處理指令碼 - 日期與時間
- 批處理指令碼 - 輸入/輸出
- 批處理指令碼 - 返回程式碼
- 批處理指令碼 - 函式
- 批處理指令碼 - 程序
- 批處理指令碼 - 別名
- 批處理指令碼 - 裝置
- 批處理指令碼 - 登錄檔
- 批處理指令碼 - 網路
- 批處理指令碼 - 列印
- 批處理指令碼 - 除錯
- 批處理指令碼 - 記錄
- 批處理指令碼資源
- 批處理指令碼 - 快速指南
- 批處理指令碼 - 有用資源
- 批處理指令碼 - 討論
批處理指令碼 - 複製
此批處理命令用於將檔案從一個位置複製到另一個位置。
語法
Copy [source] [destination]
將從源位置複製檔案到目標位置。
示例
以下示例顯示了 copy 命令的不同變體。
@echo off cd Rem Copies lists.txt to the present working directory. If there is no destination identified , it defaults to the present working directory. copy c:\lists.txt Rem The file lists.txt will be copied from C:\ to C:\tp location copy C:\lists.txt c:\tp Rem Quotation marks are required if the file name contains spaces copy “C:\My File.txt” Rem Copies all the files in F drive which have the txt file extension to the current working directory copy F:\*.txt Rem Copies all files from dirA to dirB. Note that directories nested in dirA will not be copied copy C:\dirA dirB
輸出
所有操作均按批處理檔案中的備註執行。
batch_script_commands.htm
廣告