查看完整版本: [-- 如何在两个硬盘之间复制大量文件 --]

狗狗静电BBS - wwW.DoGGiEhoMe.CoM -> 电脑全方位 Computer Guide -> 如何在两个硬盘之间复制大量文件 [打印本页] 登录 -> 注册 -> 回复主题 -> 发表主题

sunnybear 2009-02-21 19:18
硬盘A大概有160G的文件,想复制到硬盘B,有什么快速安全的方法,且能保持文件的原有生成日期

硬盘A和硬盘B原本都有文件,所以不能进行硬盘对拷。

xp自带的复制粘贴,或者剪切粘贴都会将原由的文件日期破坏,而且不怎么安全

galilette 2009-02-22 01:17
我的思路:
1) 看一下windows自带的类似cp或者xcopy之类的命令行有没有参数可以设定archive mode
2) 不行的话看看winzip或者winrar有没有archive mode
3) 再不行装cygwin. 只要里面的coreutils包. 然后就可以用linux版的cp了..

sunnybear 2009-02-22 01:52
Quote:
引用第1楼galilette于2009-02-22 01:17发表的  :
我的思路:
1) 看一下windows自带的类似cp或者xcopy之类的命令行有没有参数可以设定archive mode
2) 不行的话看看winzip或者winrar有没有archive mode
3) 再不行装cygwin. 只要里面的coreutils包. 然后就可以用linux版的cp了..

cygwin貌似有装,但很久没用了。linux也有一年多没碰了,cp的命令可以保持原有的日期么?还是需要特别的参数。

之前有人推荐用ftp,映像中下载ftp好像还是会修改日期的吧。

谢谢大狗头

edit:刚才看了之前用ftp下载的文件,发现文件的日期不变,变的还是文件夹日期。

sunnybear 2009-02-22 02:50
Copy code
C:\>help xcopy
Copies files and directory trees.

XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W]
                          [/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U]
                          [/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z]
                          [/EXCLUDE:file1[+file2][+file3]...]

  source      Specifies the file(s) to copy.
  destination  Specifies the location and/or name of new files.
  /A          Copies only files with the archive attribute set,
              doesn't change the attribute.
  /M          Copies only files with the archive attribute set,
              turns off the archive attribute.
  /D:m-d-y    Copies files changed on or after the specified date.
              If no date is given, copies only those files whose
              source time is newer than the destination time.
  /EXCLUDE:file1[+file2][+file3]...
              Specifies a list of files containing strings.  Each string
              should be in a separate line in the files.  When any of the
              strings match any part of the absolute path of the file to be
              copied, that file will be excluded from being copied.  For
              example, specifying a string like \obj\ or .obj will exclude
              all files underneath the directory obj or all files with the
              .obj extension respectively.
  /P          Prompts you before creating each destination file.
  /S          Copies directories and subdirectories except empty ones.
  /E          Copies directories and subdirectories, including empty ones.
              Same as /S /E. May be used to modify /T.
  /V          Verifies each new file.
  /W          Prompts you to press a key before copying.
  /C          Continues copying even if errors occur.
  /I          If destination does not exist and copying more than one file,
              assumes that destination must be a directory.
  /Q          Does not display file names while copying.
  /F          Displays full source and destination file names while copying.
  /L          Displays files that would be copied.
  /G          Allows the copying of encrypted files to destination that does
              not support encryption.
  /H          Copies hidden and system files also.
  /R          Overwrites read-only files.
  /T          Creates directory structure, but does not copy files. Does not
              include empty directories or subdirectories. /T /E includes
              empty directories and subdirectories.
  /U          Copies only files that already exist in destination.
  /K          Copies attributes. Normal Xcopy will reset read-only attributes.
  /N          Copies using the generated short names.
  /O          Copies file ownership and ACL information.
  /X          Copies file audit settings (implies /O).
  /Y          Suppresses prompting to confirm you want to overwrite an
              existing destination file.
  /-Y          Causes prompting to confirm you want to overwrite an
              existing destination file.
  /Z          Copies networked files in restartable mode.

The switch /Y may be preset in the COPYCMD environment variable.
This may be overridden with /-Y on the command line.


windows下的,看了下,貌似没有

sunnybear 2009-02-22 04:05
用xcopy尝试了几下
加上/e 可以复制所有的文件和文件夹
文件日期可以保持,但是文件夹就是今天的了... [s:6]

google了一下,看到一老外说用xxcopy加上/tcc命令,发现没有效果
具体帖子在这里 http://www.vbforums.com/archive/index.php/t-237067.html

sunnybear 2009-02-22 04:18
用xxcopy试验成功... 貌似之前眼睛走神(难怪,都7点了), xxcopy /e就可以做到了...估计xcopy也可以做到,还没有测试
现在先让它拷着。。明天...哦。。不...今天过会验证一下再贴上来

xcopy拷贝的速度真的是相当之快... [s:1]

galilette 2009-02-22 10:29
cp的话用cp -a

from CP(1)
Quote:

NAME
      cp - copy files and directories

SYNOPSIS
      cp [OPTION]... [-T] SOURCE DEST
      cp [OPTION]... SOURCE... DIRECTORY
      cp [OPTION]... -t DIRECTORY SOURCE...

DESCRIPTION
      Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.

      Mandatory arguments to long options are mandatory for short options too.

      -a, --archive
              same as -dpR

.
.
.
      -d    same as --no-dereference --preserve=links
.
.
.
      -p    same as --preserve=mode,ownership,timestamps
.
.
.
      -R, -r, --recursive
              copy directories recursively

sunnybear 2009-02-22 13:35
尝试过了。xcopy会改变日期

然后我刚才点了文件夹的属性看了看,发现奇怪的现象

用鼠标移动到文件夹上显示的日期是左边的,点击右键,属性,显示的时间是右边的

一个是修改日期,一个是创建日期。为什么会这样

[attachment=75230]

galilette 2009-02-22 14:51
通常都有几个时间戳的, linux下还有3个, ctime (create), mtime (modify time), atime (access time)

玫瑰刺猬 2009-02-25 18:15
[s:1] 做镜像硬G呢?

sunnybear 2009-08-10 01:31
这帖子居然还在第一页...原来我2月买的硬盘...现在已经满了..-_-


查看完整版本: [-- 如何在两个硬盘之间复制大量文件 --] [-- top --]



Powered by PHPWind v6.0 Code © 2003-05 PHPWind
Gzip enabled

You can contact us