什么是
windows命令提示符命令来复制文件?
我需要将文件从位置A移动到位置B.此外,如果位置B的文件夹不存在,我想创建它.
我需要这个命令行,所以我可以自动化它.
Windows的版本是XP.
命令xcopy是您正在寻找的.例:
xcopy source destination /E /C /H /R /K /O /Y
上面的命令将源复制到目标,文件和目录(包括空的),不会停止出错,将复制隐藏和系统文件,将覆盖只读文件,将保留属性和所有权/ ACL信息,并将抑制提示覆盖现有目标文件.
/E Copies directories and subdirectories,including empty ones.
Same as /S /E. May be used to modify /T.
/C Continues copying even if errors occur.
/H Copies hidden and system files also.
/R Overwrites read-only files.
/K Copies attributes. Normal Xcopy will reset read-only attributes.
/O Copies file ownership and ACL information.
/Y Suppresses prompting to confirm you want to overwrite an
existing destination file.
有关更多信息,请输入xcopy /?和你的命令行.