Windows xcopy: Difference between revisions

Jump to navigation Jump to search
718 bytes added ,  28 December 2016
+錯誤訊息: 是否指定目標檔案,名稱或目標目錄名稱 (F = 檔案,D = 目錄)?
(+錯誤訊息: 是否指定目標檔案,名稱或目標目錄名稱 (F = 檔案,D = 目錄)?)
Line 35: Line 35:
xcopy /y "c:\Windows\notepad.exe" "c:\Program Files\notepad.exe"
xcopy /y "c:\Windows\notepad.exe" "c:\Program Files\notepad.exe"
</pre>
</pre>
== 錯誤訊息: 是否指定目標檔案,名稱或目標目錄名稱 (F = 檔案,D = 目錄)? ==
輸入命令的例子:
<pre>
xcopy /y "c:\source\abc.gz" "c:\target\def.gz"
出現訊息:
def.gz 是否指定目標檔案
名稱或目標目錄名稱
(F = 檔案,D = 目錄)?
</pre>
原因: 例子中的 c:\target\ 資料夾並不存在。如果選擇
* (1) F = 檔案,會建立 target 資料夾,並且複製檔案到 c:\target\def.gz
* (2) D = 目錄,會建立 c:\target\def.gz\ 資料夾,並且複製檔案到 c:\target\def.gz\abc.gz
相關資料
* [http://superuser.com/questions/817586/xcopy-not-creating-source-folder-on-target-drive Xcopy not creating source folder on target drive - Super User]


[[Category:Windows]]
[[Category:Windows]]

Navigation menu