简体   繁体   English

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

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

I tried to copy a folder from a remote machine to the base machine using copy command,but only the files seems to be copying. 我试图使用copy命令将文件夹从远程计算机复制到基本计算机,但是似乎只有文件正在复制。 The folders are not getting copied. 文件夹没有被复制。 Below is the piece of command I used to copy the "src_folder" folder in the remote machine to the "dest_folder" folder in the base machine. 下面是我用于将远程计算机中的“ 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

Please help me in resolving this issue. 请帮助我解决此问题。 Thanks in advance. 提前致谢。

Got the solution : 得到了解决方案:

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

where: 哪里:

/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.

The above command works. 上面的命令有效。

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

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

/s for copy folders and subfolders without empty folders / s用于没有空文件夹的副本文件夹和子文件夹

/e Copy empty subfolders / e复制空子文件夹

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

相关问题 使用staf将文件从linux复制到远程Windows机器 - Copy file from linux to remote windows machine using staf 在没有Cygwin的情况下将文件从远程Windows计算机复制到Linux计算机 - Copy a file from remote Windows machine to Linux machine without Cygwin 使用Java将文件从本地窗口机器复制到远程Windows机器 - Copy files from local window machine to remote windows machine using java 使用 RCP 或 FTP 将文件从远程 unix 机器复制到本地 windows 机器上 - Using RCP or FTP to copy files from a remote unix machine onto a local windows machine 使用批处理命令将文件从一台服务器复制到另一台服务器 - Windows 机器 - Copy files from One Server to Another Server using Batch Command - Windows machine 无法在 Windows 中使用 python 复制文件夹 - can't copy folders using python in windows Windows复制文件/文件夹 - windows copy of files / folders 仅从文件夹复制Windows文件大小 - Copy windows file size from folders only 如何使用Java将文件从一台Windows计算机复制到另一台Windows计算机文件夹 - How do i copy a file from one windows machine to other windows machine folder using java 如何使用批处理脚本将文件从一台Windows计算机复制到特定驱动器中的另一台Windows计算机? - How to copy the file from one windows machine to another windows machine in a particular drive using batch script?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM