使用 DOS(命令提示符)将所有文件和文件夹从一个驱动器复制到另一个驱动器
我想使用 MS-DOS 将所有文件和文件夹从一个驱动器复制到另一个驱动器。怎么做呢?
我正在尝试 xcopy I:\*.* N:\ 但它只复制文件,而不复制文件夹。那么如何复制所有文件和文件夹呢?
谢谢。
i want to copy all files and folders from one drive to another drive using MS-DOS. How to do it?
I am trying xcopy I:\*.* N:\
But it copies only files, not folders. So how to copy all files and folders both?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
使用上面的命令。它肯定会起作用。
在此命令中,数据将从 c:\ 复制到 D:,甚至包括文件夹和系统文件。这些标志的作用如下:
/h
还复制隐藏文件和系统文件/i
如果目标不存在并且复制多个文件,则假设目标必须是一个目录/k
复制属性/e
复制目录和子目录,包括空目录/r
> 覆盖只读文件/y
禁止提示确认是否要覆盖文件/z
以可重新启动模式通过网络进行复制。Use the above command. It will definitely work.
In this command data will be copied from c:\ to D:, even folders and system files as well. Here's what the flags do:
/h
copies hidden and system files also/i
if destination does not exist and copying more than one file, assume that destination must be a directory/c
continue copying even if error occurs/k
copies attributes/e
copies directories and subdirectories, including empty ones/r
overwrites read-only files/y
suppress prompting to confirm whether you want to overwrite a file/z
Copies over a network in restartable mode.使用 xcopy /s I:\*.* N:\
这是应该做的。
Use
xcopy /s I:\*.* N:\
This is should do.
使用robocopy。 Robocopy 默认在 Windows Vista 及更高版本上提供,并被认为是
xcopy
的替代品。 (xcopy
有一些重大限制,包括它无法处理超过 256 个字符的路径,即使文件系统可以)。请注意,在卷的根目录上使用
/purge
将导致 Robocopy 对系统卷信息目录内的文件应用请求的操作。运行robocopy /?
寻求帮助。另请注意,您可能希望以管理员身份打开命令提示符以便能够复制系统文件。要加快速度,请使用/b
而不是/zb
。Use
robocopy
. Robocopy is shipped by default on Windows Vista and newer, and is considered the replacement forxcopy
. (xcopy
has some significant limitations, including the fact that it can't handle paths longer than 256 characters, even if the filesystem can).Note that using
/purge
on the root directory of the volume will cause Robocopy to apply the requested operation on files inside the System Volume Information directory. Runrobocopy /?
for help. Also note that you probably want to open the command prompt as an administrator to be able to copy system files. To speed things up, use/b
instead of/zb
.这对我有用在 Windows 10 上,
xcopy /s {源驱动器..ie C:} {目标驱动器..ie D:}
这将复制所有文件和文件夹以及文件夹内容。
This worked for me On Windows 10,
xcopy /s {source drive..i.e. C:} {destination drive..i.e. D:}
This will copy all the files and folders plus the folder contents.
尝试此命令,xcopy c:\(文件或目录路径)F:\ /e。如果您想了解更多详细信息,请参阅此网站 [[http://www.computerhope.com/xcopyhlp.htm]]
try this command, xcopy c:\ (file or directory path) F:\ /e. If you want more details refer this site [[http://www.computerhope.com/xcopyhlp.htm]]