transferring files

Mar 17, 2012 22 Replies

Windows XP


I'm trying to free up some space on a hard drive. Moving directories to another HD, some directories come out with the same number of files and some don't (I'm talking about several thousand files/directory)



I tried transferring the same directory twice and get the same different value on the destination drive.



Is this a quirk of windows?



Have some folders got hidden or system files in them? turn on viewing them under tools/options before selecting/copying

Is it an NTFS partition? If so do you have rights to all the files/subfolders?

I think I've seen this, but can't remember what causes it. Have you tried pressing F5 to refresh the Windows Explorer screen (if that's what you're using)? I often have problems with directory listings on networked drives, and this usually fixes it.

Alternatively, there may be problems with file protections (e.g. hidden files). Can you find the missing files using windiff, or just viewing both folders in parallel Expolrer displays? Then see what happens if you try to copy the missing files manually.

You could also try doing the copy from an MSDOS prompt.

Chris

Probably hidden/system files. Easiest way (IMHO) is to use the XCOPY command in acommand window. The /H option is useful. Type XCOPY /? to get help.

Seems OK

Bog standard SATA drive plugged into the same machine

Trying a scan ATM - what a horrible program

This one has 17k files in 16 folders

..now I KNOW why I moved to...Linux.

Use a command prompt (but not at the root directory), get listings of both directories into a file. Example:

DIR/B C:\path >LIST1 DIR/B D:\path >LIST2

(The names should be sorted; if not use DIR/O/B.) Then compare the two files using:

FC LIST1 LIST2

which should highlight all the differences.

En el artículo , Bob Eager escribió:

cp -a is a little better.

Yes. Make sure teh properties on all directories aren't set to 'read only'. You can reset properties on a complete tree.

This causes problems when copying files to CDs, etc.

Probably a hidden or system file not being copied.

Have a go with:

formatting link
much more informative way to copy and the recovery is a darn sight better when there are problems on individual files.

rsync -av --delete --dry-run

is a handy way of checking the result of a copy. Andfixing it by chopping the --dry-run off.

The way I move large (100+GB) live filesystems between servers (eg upgrade) is to start rsyncing the day before on the live source.

Then issue the downtime edict and a quick rsync cleans up few changes/missing bits.

Put a linux live disc in it, boot it up, it solves so many problems. Live distros often take no notice of any file permissions, making backup much easier.

NT

There is believe or not a better than that command, I discovered it by accident. Its called Robocopy, short for Robust Copy. It is not a very widely known command.

type Robocopy/? to get the help info

Its part of Windows 7 command prompt at least. I don't know about Win XP or earlier though.

Robocopy even works with network storage drives that use the UNC format, e.g. //Freenasred/PrimaryDrive instead of being forced to set up network drive to logical drive letter mappings beforehand

Robocopy is so good that it if falls over part way trough, such as when the network drive drops off the network etc. it can be restarted and it will robustly check what has been copied and not been copied.It will retry the files that did not copy over.

You also get a list of the files that did not copy over.

Its great for copying from network drive to another network drive. Disk copy, Xcopy and copy will not do this.

Regards

Stephen.

P.S and Robocopy is FAST over a network.... Last time I used it I was getting 250 megabits across the network from one NAS box to another NAS box. This was on a 1 gigabit network though. This equates to about 30MB/s

Obviously it will be faster if the two hard drives are within the same machine on SATA or firewire and probably USB2 interfaces....

And rsync is much better.

/C on XCOPY

XCOPY does that by default but /Q suppresses it.

Any opinion on XXCOPY?

Very powerful, loads of options inc lots on reporting but that in turn makes it more difficult to remember the switches.

eg. Geoff's command line would be:

XXCOPY /S /V /H /oN

/S for include subdirectories /V for verify copy by file size only /H for include system and hidden files /oN for log errors (only) to (very handy)

I think it's quite clever at buffering so copying runs pretty quickly.

formatting link

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required