Editing
Windows xcopy
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== 錯誤訊息: 是否指定目標檔案,名稱或目標目錄名稱 (F = 檔案,D = 目錄)? == 輸入命令的例子: <pre> xcopy /y "c:\source\abc.gz" "c:\target\def.gz" 出現訊息: def.gz 是否指定目標檔案 名稱或目標目錄名稱 (F = 檔案,D = 目錄)? </pre> 原因: 例子中的 c:\target\ 資料夾並不存在。如果選擇 * (1) F = 檔案,會建立 c:\target 資料夾,並且複製檔案到 c:\target\def.gz * (2) D = 目錄,會建立 c:\target\def.gz\ 資料夾,並且複製檔案到 c:\target\def.gz\abc.gz 解決方式: 參考資料 [http://jdev.tw/blog/4334/xcopy-with-echo xcopy使用技巧 | 簡睿隨筆 | 學習過程的紀錄與備忘] <pre> # 自動輸入 F (檔案) echo F | xcopy /y "c:\source\abc.gz" "c:\target\def.gz" # 自動輸入 D (目錄) echo D | xcopy /y "c:\source\abc.gz" "c:\target\def.gz" </pre> 相關資料 * [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]]
Summary:
Please note that all contributions to LemonWiki共筆 are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
LemonWiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Current events
Recent changes
Random page
Help
Categories
Tools
What links here
Related changes
Special pages
Page information