什么是Windows命令行命令来复制文件?
什么是windows规范复制文件的准时命令?
我需要将文件从区域A重新定位到区域B.此外,如果区域B的文件夹不存在,我打算开发它。
我要求它是一个命令行,所以我可以自动化它。
Windows的变化是XP。
0
David Basarab 2019-05-13 04:15:04
资源
分享
答案: 5
在一套文件中:
if not exists locationB\nul mkdir locationB
copy locationA\file locationB
if not exists
检查参数以查看它是否存在,但它只适用于文档。 寻找存在的 目录网站 ,你需要寻找一个名为“nul”的'准文件' - 如果目录网站存在,监控这些文件的存在肯定会不断返回真实状态。
副本行将目录站点locationA
中名为file
的文档复制到locationB
,并将文档命名为相同的点。 如果您打算在同一时间重新标记文档,您也可以这样做:
copy locationA\file locationB\newfilename
0
Graeme Perrow 2019-05-17 17:06:51
资源
分享
命令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 /?
以及命令行。
0
相关问题
0