views:

267

answers:

4

Hi, I need to find photos on external devices like cameras and mobiles connected as USB pendrive. As I don't want to traverse all disks, I thought of looking for specific folders under root or deeper, e.g. DCIM for cameras and start traverse from there.

For cameras the directory structure is specified in the Design rule for Camera File system (DCF) as always using a DCIM directory at root.

But for different mobile brands I did not find any rules. So can you please help me out and post the directory where your photos are stored in when you're mobile is connected as USB pendrive along with yout mobiles brand?

I'm looking for all major brands, like Nokia, LG, Samsung, Sony Erricson, etc. (IPhone connects as camera under 'camera and scanners', so I need to TWAIN it, but that works...)

Thanks a lot!

A: 

My Blackberry Curve stores images on the SD card in X:\BlackBerry\pictures by default.

genpfault
Thank you, Greetz GHad
GHad
+3  A: 

Lots of ways to get to the images.

Device specific - Needs lots of hardware to test with. An easily unpalatable app could handle getting new devices supported.

  1. Check for known vendor/device id's on USB bus with related info on how to get to data. Some may have proprietary methods for extracting images.

Drive based photos - traverse entire drive makes it future proof, however speed is bad.

  1. For each removable drive in system.
  2. Check for existence of "known" base folders
    • If found, traverse from base folder
    • Else, traverse entire drive

TWAIN based photos - not a clue with these

  1. Lookup iphone, would this be for capturing new photos, or actually viewing previously captured photos
TJ
Thanks for this comment. Driver specific: As I don't have all this HW, I'm asking here, cause nearly every user has a mobile... Driver based photos: Thought of that, but need a way to check from Java if a drive is fixed or connected, is there eny way? But I'll consider traversing the whole drive as an option. TWAIN based: As using Java, when converting Twain images to JPG w/o ImageIO I'm losing all EXIF infos, which I need for the app, but I think as most mobiles do not connect as TWAIN, this is just a fallback for iPhone and such mobiles. Greetz, GHad
GHad
If your looking to test on hardware and have some $$$ http://www.deviceanywhere.com/ is a good bet for mobile devices. I've used this service before with great results.
Phill Pafford
A: 

My Samsung Omnia gives me the default

DCIM

directory on the root of the assigned drive.

Note that I have to specifically enable USB file transfer on the phone, otherwise all files need to come through the Windows Mobile Device folder.

Paul Alan Taylor
A: 

I know this is a hack but you could try something like this and then record (in a DB) the make/model/handset stats in for future.

in Linux (on the command line) (This is an example)

ls /*/*.jpg

This would look under the first level of directories for any file with a .jpg extension.

ls /*/*/*.jpg

For the second directory

Again this is just a hack and really not advised for production, but for testing to get a working path for a device this might come in handy.

Phill Pafford
Good idea, I will combine the approaches mentioned here: First I'll try known pathes, if this fails, I'll search whole drive. If found, I'll persist the directory for future usage. Thanks Phill and others!Greetz,GHad
GHad