Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Cloud9

macrumors 6502
Original poster
Aug 10, 2005
333
17
between flesh and thought
I know that many of the photogs that post on this site use or have used Canon Digital Cameras. It seems (from reading the manual) that the 20d likes to create new Folders on the Cf card at random times or if a created folder reaches a contents limit of 100 images. When it comes time to import the files on the Cf card I now have to deal with an annoying directory tree that I will restructure anyway.

Is there a way to import images from the CF card to One folder without haveing to copy and paste from each of the cameras created folders? Or as an alternative, Is there away to take a tree of folders and and remove all sub folders to bring all files to the root folder in the tree.

Thanks
 

sjl

macrumors 6502
Sep 15, 2004
441
0
Melbourne, Australia
Cloud9 said:
It seems (from reading the manual) that the 20d likes to create new Folders on the Cf card at random times or if a created folder reaches a contents limit of 100 images. When it comes time to import the files on the Cf card I now have to deal with an annoying directory tree that I will restructure anyway.

Is there a way to import images from the CF card to One folder without haveing to copy and paste from each of the cameras created folders? Or as an alternative, Is there away to take a tree of folders and and remove all sub folders to bring all files to the root folder in the tree.

Thanks
Easy. Copy the tree to the hard drive "as is". Then open up a Terminal window (Applications, Utilities). Type in "cd " into the terminal window, then drag and drop the root of the tree on the hard drive (1 above the xxxCANON folders) into the window. Bring that window to the front, and press return. Now type "mv */* ."

Hey presto: all the files are now in the root of the tree. You can, if you want, nuke the directories by typing "rmdir ???CANON" (or delete them from the Finder; my way will only remove the directories if all the files have been successfully moved out, though.)

There are times when having access to a Unix layer makes things a lot easier. This is one such.
 

ChrisA

macrumors G5
Jan 5, 2006
12,828
2,033
Redondo Beach, California
sjl said:
Now type "mv */* ."

That works if the directory tres are only one deep. If they are nested several deep you can use "find" the find all the JPG files in the tree of directories

find . -name *jpg -exec mv '{}' . \;

You can type "man find" to print out the find manual page and read it.
 

sjl

macrumors 6502
Sep 15, 2004
441
0
Melbourne, Australia
ChrisA said:
That works if the directory tres are only one deep. If they are nested several deep you can use "find" the find all the JPG files in the tree of directories

find . -name *jpg -exec mv '{}' . \;

You can type "man find" to print out the find manual page and read it.
In the case of the 20D, which is the body I have, they will be nested only one deep. You're not wrong in what you're saying, just that it's more complexity than the original poster needs, or wants to understand. The other point is, my way will work regardless of whether he's shooting raw, JPEG, or both; your way will work only if he's shooting JPEG (and there are likely to be case issues as well.)

As long as he's careful to follow each step exactly as written, there is no risk to his data; there will be no filename clash caused by the 20D. Just be careful if the camera's setup to restart the numbering from zero each time the empty CF card is inserted, is the only thing to be aware of - put the new files into a new tree each time to avoid any chance of a clash.
 

Dark

macrumors regular
Aug 22, 2005
209
5
New Jersey
You could always just connect the camera to your computer with the supplied usb cable and use capture. Thats what I do......although I want to get a Card Reader because I have a feeling it goes wayy faster then it does now.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.