I am trying to extract all the .jpgs from a corrupted iPhoto Library folder. I don't want to remove any of the thumbnails in there, so am using this command:
cp `find * | grep -i jpg | grep -v Thumbs` ~/iPhotoNew
The one issue here is that if two .jpgs have the same filename the command will overwrite the first with the second and I will lose some photos. Ideally what'd I'd like to do is rename each file that is being copied in a simple sequence: 1.jpg, 2.jpg, 3.jpg, etc. How do I build this into my command?
Thanks.