繁体   English   中英

无法使用远程Windows计算机上的“复制”命令复制文件夹

[英]Unable to Copy folders using Copy command from a remote windows machine

我试图使用copy命令将文件夹从远程计算机复制到基本计算机,但是似乎只有文件正在复制。 文件夹没有被复制。 下面是我用于将远程计算机中的“ src_folder”文件夹复制到基础计算机中的“ dest_folder”文件夹的命令。

net use \\xx.xx.xx.xx\c$\ password /user:username
copy \\xx.xx.xx.xx\c$\src_foldername C:\dest_foldername

请帮助我解决此问题。 提前致谢。

得到了解决方案:

net use \\xx.xx.xx.xx password /user:username
xcopy \\xx.xx.xx.xx\c$\src_folder C:\dest_folder /s /e /y /i

哪里:

/s : Copies directories and subdirectories, unless they are empty
/e : Copies all subdirectories, even if they are empty
/y : Suppresses prompting to confirm that you want to overwrite an existing destination file
/i : If Source is a directory or contains wildcards and Destination does not exist, xcopy assumes destination specifies a directory name and creates a new directory.

上面的命令有效。

在CMD中尝试XCOPY https://support.microsoft.com/en-us/kb/240268

xcopy \\xx.xx.xx.xx\c$\src_foldername\*.* C:\dest_foldername\ /s /e

/ s用于没有空文件夹的副本文件夹和子文件夹

/ e复制空子文件夹

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM