PDA

View Full Version : Copy all jpgs to flash drive the easiest way


MannyL
08-10-2014, 07:31 PM
I have a friend that has 2 hard drives in her PC. One is an old Windows XP install that was just thrown in so she could access her old pictures and documents. The other drive has Windows 8 on it but it's failing. Right now the system is stuck in an endless loop.

What's the easiest way to boot from a live CD and copy all .doc .jpg .gif files from both drives onto a flash drive so I can replace her HDD with a known good one and get her back up with a fresh OS install?

johnpost
08-10-2014, 08:10 PM
Xubuntu 12.04 LTS will live boot and fit on a CD.

Gnome Commander is a good dual pane file manager.

MannyL
08-10-2014, 09:29 PM
Xubuntu 12.04 LTS will live boot and fit on a CD.

Gnome Commander is a good dual pane file manager.

Ok I have Ubuntu running on a Live CD. (well Live USB) Off an 8GB Flash Drive. Can I used the unused space to save the salvaged files?

CoastalMaineiac
08-10-2014, 09:31 PM
If you are using a Linux live CD, it sounds like you could do it with the find command.

find /path/to/source/drive/ -iname "*.jpg" -o -iname ".*doc" -o - iname "*.gif" -exec cp {} /path/to/destination/drive/.

This seems to be the syntax you would need, although it has been a long time since I have had to do anything with the find command.

You would need to find out where the Live CD mounted the drive you want to copy from (and how to mount it, if it did not), and the same for the drive you want to copy to, and then enter the command at the prompt, replacing the /path/to/... with the actual paths. Usually, you can get to a command prompt by hitting Control+Alt+F1 (Any F-key numbered 1-6). Control+Alt+F7 will usually get you back to the GUI, FYI.

MannyL
08-10-2014, 09:58 PM
If you are using a Linux live CD, it sounds like you could do it with the find command.

find /path/to/source/drive/ -iname "*.jpg" -o -iname ".*doc" -o - iname "*.gif" -exec cp {} /path/to/destination/drive/.

This seems to be the syntax you would need, although it has been a long time since I have had to do anything with the find command.

You would need to find out where the Live CD mounted the drive you want to copy from (and how to mount it, if it did not), and the same for the drive you want to copy to, and then enter the command at the prompt, replacing the /path/to/... with the actual paths. Usually, you can get to a command prompt by hitting Control+Alt+F1 (Any F-key numbered 1-6). Control+Alt+F7 will usually get you back to the GUI, FYI.

Thank you. My new problem is lettings Windows chkdsk run on the drive because ubuntu was "complaining" about hibernation state.

CoastalMaineiac
08-11-2014, 03:04 AM
Thank you. My new problem is lettings Windows chkdsk run on the drive because ubuntu was "complaining" about hibernation state.

What's the status of the drive if you run the following from within Ubuntu?
hdparm -I /dev/hda
Note: if the drive is a SATA drive, it is probably sda instead of hda. Since there are two drives, it could also be hdb or sdb.

I know I've had to do low-level wipes on hard drives before using the hdparm command, and if the status showed "frozen," I would have to suspend the system to RAM and wake it back up to clear the frozen state before I could do anything with the drive. Since it's complaining about a hibernation state, perhaps it is a similar issue with, hopefully, a similar solution.

septimus
08-11-2014, 04:48 AM
Same-named files in different folders may pose a problem. One simple workaround might be to replace cp with cp -i . At least this will show you the same-namings.

bump
08-11-2014, 02:35 PM
Why not just boot some sort of Windows XP command-line boot disk (assuming it supports usb) and then use XCOPY to grab all the jpegs to the thumb drive?

MannyL
08-11-2014, 06:13 PM
Why not just boot some sort of Windows XP command-line boot disk (assuming it supports usb) and then use XCOPY to grab all the jpegs to the thumb drive?

I feel the *nix based file copy routines are better tasked to copy files that may have errors.