What's with all the random folders in the DCIM directory for iPhone?

My photos are spread across 17 seemingly randomly named folders in my iPhone 5's DCIM directory.

I can't make any sense of this and it is quite painful looking through all of these directories to find the photo I'm looking for.

Why is my device doing this and can I make it stop?

dcim


  • Just place yourself on the DCIM folder and choose to search.
  • Search for *.*
  • Choose some thumb nail view
  • Sort result by name

You will see all your pictures in order and it's easy to find the picture you are looking for.


These "randomly named folders" are consistent with the Design rule for Camera File system (DCF) that Apple and all modern digital cameras use.

From the Wikipedia article on DCF: (emphasis my own)

Directory and file structure

The filesystem in a digital camera contains a DCIM (Digital Camera Images) directory, which can contain multiple subdirectories with names such as "123ABCDE" that consist of a unique directory number (in the range 100…999) and five alphanumeric characters, which may be freely chosen and often refer to a camera maker. These directories contain files with names such as "ABCD1234.JPG" that consist of four alphanumeric characters (often "DSC_", "DSC0", "DSCF", "IMG_"/"MOV_", or "P000"), followed by a number.

My Sony digital camera creates a single 101MSDCF subdirectory by default, and I can manually create more if I wish, which it names 102MSDCF, 103MSDCF, etc. Whereas my iPad seems to create a folder for each 30-day period. (?)

If the iPad is mounted as a "USB mass storage device" then you should see this directory structure in Windows Explorer. However, if using another application or "protocol" then you probably won't. For instance, I can use Paint.NET (Windows) to "Acquire" photos from my iPad using the Picture Transfer Protocol (PTP) - using this method hides the underlying directory structure.


Your information is stored in files, but also in databases. There's a database somewhere that holds the metadata describing some event and bridging that event with the file location. To you it looks random: to the phone though, it doesn't care where the file is stored as long as it has an entry in the database.

Think of the database as being a type of "table of contents" - a page of information can live anywhere in the book and the reader might not care where, as long as they can find it.

In short, what you're looking at makes sense to the phone, and was never meant to make sense to you, because you're not supposed to be looking at it from this view. You're supposed to look at it through some other app (someone mentioned Photo Gallery - I don't know if that's true but it sounds likely).


I too have been rather bemused, trying to make sense of the folder / directory naming of recent months.

The folders were always oddly named, but it wasn't random - from looking at my various iOS devices in the past (of which I currently have three), all of them seemed to be working on some kind of predefined sequence in terms of the folder names served up (in my case) under Win Explorer in Windows 8.1. Each one of these 'folders' was named with an 8 alphanumerical character name, and would contain up to 1000 images, before moving on to the next one.

Then along came iOS 8. First of all, they seemed to be allowing predefined (by iOS) folders to get endlessly bigger than just 1000 pics. At one point I have 3500 in one of the folders. Then, either iOS 8.1 or 8.1.1 (I forget) changed things, so that pictures were contained in an individual folder for each month. On my iPhone 4s and iPad Mini 2, these are still running on a predefined title (i.e. they both use the same folder names compared side by side, so not random). On my iPhone 5c, every time I plug in my phone, the folders are labelled differently, so this is truly random it would seem. I concur with you that countless folders are being created; even if you only take one picture a month for 12 months, you'll see 12 folders for each of those calendar months (I believe).

My 4s, Mini 2 and 5c are all running iOS 8.1.2. I have no idea why the 5c is behaving differently; to summarise all are creating 8 digit named folders for each month of pictures, but only the 5c is doing this randomly every time I unplug and plug it back in to the USB port. As someone else said above, the iPhone uses some kind of light-SQL database to store and dictate all sorts of things, and I think the folders are generated 'virtually' from this, so there must be something weird going on in that DB on my 5c (and prob your device, from what you've described) that probably only Apple can answer.....

I hope in some way that helps, if nothing else to agree you're not the only baffled here! :-)