我尝试使用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请帮我解决这个问题。提前谢谢。
发布于 2016-02-02 20:40:45
得到了解决方案:
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.上面的命令有效。
发布于 2016-02-02 20:36:53
在CMD https://support.microsoft.com/en-us/kb/240268中试用XCOPY
xcopy \\xx.xx.xx.xx\c$\src_foldername\*.* C:\dest_foldername\ /s /e用于复制文件夹和子文件夹而不带空文件夹的/s
/e复制空子文件夹
https://stackoverflow.com/questions/35153385
复制相似问题