[英]Xcopy does not copy file beofre select F for file or D for directory
So I try to copy file via Xcopy
with this simple command
:所以我尝试使用这个简单的
command
通过Xcopy
复制文件:
xcopy c:\file.doc d:\file.doc
And i received this output:我收到了这个输出:
Does C:\file.doc specify a file name
or directory name on the target
(F = file, D = directory)?
And only after select one of the options the file copied.并且仅在选择文件复制的选项之一之后。
Any chance to avoid this message?有机会避免这条消息吗? I try to run this via
Jenkins Execute windows batch command
and this not working brabably because this message我尝试通过
Jenkins Execute windows batch command
运行它,但它无法正常工作,因为这条消息
Just add *
char at the end of destination path, in your case:在您的情况下,只需在目标路径的末尾添加
*
字符:
xcopy c:\file.doc d:\file.doc*
Also in Windows 11 (not sure about earlier versions) xcopy command has new option /-I
- if destination does not exist and copying a single specified file, assumes that destination must be a file.同样在 Windows 11(不确定早期版本)中,xcopy 命令有新选项
/-I
- 如果目标不存在并复制单个指定文件,则假定目标必须是一个文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.