3

I have a couple of boxes full of disc drives that were pulled from systems over the years. I'd like to copy files to a new drive - particularly user data files (such as from "My Documents" or whatever it was called in the version of Windows in use on that drive). I'd also like to delete files on those drives that I'm not interested in (like the Windows system directory) as I go so that I can better keep track of the stuff I do want to copy. I have a USB 3.0 gizmo that lets me hot plug the drives onto my Win7 system, but I keep running into issues with the security permissions on the 'imported' file systems.

I can work around those issues by taking ownership and occasionally deal with the ACLs on files and directories that don't even allow allow the owner to do things (surprisingly it seems that there's always a few off those). But that quickly gets to be an annoying chore and often taking ownership of a large directory tree takes a long time with little feedback on how far along the operation is taking.

So I'm looking for suggestions or solutions on how I can just copy the damn files I want to copy off these drives without having to wrestle with NTFS permissions. Native Windows tools or commands are preferred, but a solution that involves 3rd party software would be fine as well (as long as it's not too expensive).

1
  • Only way to copy them is to give yourself permission to the files if you use Windows. Windows will respect the permissions of another installation of Windows.
    – Ramhound
    Commented Oct 30, 2017 at 23:32

2 Answers 2

3

You can boot your PC off a Linux live CD/DVD/USB and then copy the files to a new drive. Linux will ignore the NTFS permissions and security. Boot once, copy an entire drive, remove the USB drive and redo till all is copied. You can copy them to a directory on your hard drive, where they will inherit the permissions of that folder, so you will be able to access them.

1

The robocopy command seems like the ideal choice in this scenario. It satisfies your preference of being native to Windows, and it also defaults to copying only the data, its attributes and its timestamps, discarding any NTFS ACLs, owner and auditing information, meaning you won't need to specify any extra copy flags for it. You can also restart it in the event of interruption.

Open CMD as an Administrator and enter the following command:

robocopy <SOURCEPATH> <DESTINATIONPATH> /S /ZB /MT:64 /R:40 /W:30 /REG /ETA

A breakdown of the switches

/S Copies all subfolders that contain files, discarding any that are empty.

/ZB Launches Robocopy in Restartable mode. Restartable mode ensures that, in the event that the command is interrupted, such as system or network failure, you can run it again to continue where it last left off. If access is denied for Restartable mode, launches Robocopy in Backup mode.

/MT:64 Multithreaded copying, where the more threads that are specified the more files Robocopy can copy at a time, resulting in faster performance. Most modern computers running 64-bit Windows should be more than capable of running 64 threads, but if performance is an issue, go lower, or if you have an exceptionally powerful machine, try the maximum of 128 threads. The default is 8.

/R:40 Sets the number of retries on failed copies to 40. The default for this flag is 1,000,000, which would make Robocopy run for prohibitively long in the event that it can't copy a particular file. If you're fine with that, and you absolutely must copy every single file without fail, you can omit this switch, but if not, it's recommended to set it to a more reasonable number.

W/:15 Sets the amount of wait time between retries in seconds. This option is useful because, often, the cause for Robocopy being unable to copy a file is the file's being locked by another process. Waiting a longer amount of time between retries can increase the likelihood that the process using the file will eventually let it go, but again, will also increase the total time it will take for Robocopy to run. The default for this flag is 30 seconds.

/REG Records the values of the /R and /W switches to a Registry key, preventing you from needing to set them to the same values when you rub Robocopy in the future.

ETA To monitor Robocopy's progress.

1
  • Works as described, but incredibly slow
    – Adrian W
    Commented Dec 13, 2020 at 20:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .