Hi
NOTE: There is an update below in the text as Firmware 2 changed things a bit
If you own an iPhone, you know this. The built in Camera application takes pictures and names them IMG_xxxx.JPG, where xxxx is an ascending number starting at 0001.
This is to keep images named differently, so even if you put them all in one folder, all has a unique name, and nothing gets overwritten. Now this works great, up unitl you decide to flash your firmware, and upgrade. If you do that, this counter gets reset, and the naming starts again from IMG_0001.JPG, and on.
I am on my 5th firmware, so you can imagine the flustration. I have IMG_0001.JPG 5 times already, and need to rename them one by one to eliminate confusion.
Just recently I was wondering if there was a way to alter the Camera’s naming, and sure enough, I found the answer on a popular iPhone forum. Read on for instrucions if you are interested….
First of all, make sure you have Mobile Finder and Mobile Text Editor installed. If you dont have it, and don’t want it, then just enable WiFi access on the iPhone, enable SSH, and log in from a remote PC. This is what I did, but I realized the Finder way is easier, so I created some screenshots with the later method so that you can try it easily. After all, not everyone is familiar with Linux/Unix shells.
Just fire up Mobile Terminal on your iPhone, and make sure under options, you have View System files, etc enabled. Also make sure the setting for showing “..” is allowed, and therefore you will be able to change directories towards the root of the system.
Once Mobile Finder is set up, just go to the following path:
/var/mobile/Media/DCIM/.MISC/
Double tap on Info.plist, and Finder should lauch Text Editor to view the contents of the file.
At this line: < integer >xxx< /integer >, xxx stands for the number that is after IMG_ in the image’s name. Just change it to whatever is next in line for you, and the pictures will be named accordingly thereafter.
This has been a huge headache for me, and as it turned out, the solution wasn’t that difficult.
Hope you find it useful,
UPDATE: Since firmware 2, Mobile Terminal is no longer an accessible commodity through Installer, at least not at present. I am on 2.1 currently. You can however still edit the file via an SSH session, which is what I did and it worked great. You can also use gTxtEdit application that you can get from Cydia, and open the Info.plist file, edit then save it.
Cheers
September 14th, 2008 at 00:08
Found this very useful…i grant u, one internet point…
September 14th, 2008 at 04:36
Glad it worked for you. Cheers
December 14th, 2008 at 23:57
very useful! thanks! =)
December 18th, 2009 at 20:55
Thanks man..
This article was great help to me
Many thanks
August 16th, 2010 at 21:35
AWESOME! Lifesaver!
August 17th, 2010 at 01:03
edit: iPhone 3GS running 4.0.1
This works great after a factory restore.
Agree: modify /var/mobile/Media/DCIM/.MISC/Info.plist integer to last phone # plus 1 (ex: last photo taken 314+1 = 315)
Next delete 3 files in /private/var/mobile/Media/PhotoData
1. com.apple.photos.caches_metadata.plist
2. Photos.sqlite
3. PhotosAux.sqlite
When you access the camera roll, it will update the library. You can also add pictures into /private/var/mobile/Media/DCIM/100APPLE prior to viewing the camera roll.
*Make sure not to delete the last photo taken from the camera roll or it will reset the integer to 1 and you’ll have to perform this task again.
November 5th, 2011 at 06:36
This doesn’t work anymore by the way (iOS 5.0) something else seems to be caching the sequence number now.
November 5th, 2011 at 06:42
I googled some more, this fixes it: http://blog.mbentley.net/2010/06/iphone-ios-4-upgrade-restore-lost-pictures-in-camera-roll/
November 21st, 2011 at 14:37
Changing iPhone Picture naming index number on 3GS with iOS5
Here’s what I did. Using iExplorer (http://www.macroplant.com/iexplorer/)
1. Backed up (by dragging and dropping to folder on desktop):
/Media/PhotoData/MISC/DCIM_APPLE.plist
/Media/PhotoData/Photos.sqlite
/Media/PhotoData/Photos.sqlite-shm
/Media/PhotoData/Photos.sqlite.wal
2. Using iExplorer, deleted the following on the iPhone
/Media/PhotoData/Photos.sqlite
/Media/PhotoData/Photos.sqlite-shm
/Media/PhotoData/Photos.sqlite.wal
3. Edited DCIM_APPLE.plist on the desktop so that contained the correct AND the correct folder number (if you are over 999 photos you need to increment the folder number to 101, if you are over 1999 photos you need to increment the folder number to 102 I think…)
So:
DCIMLastDirectoryNumber
101
DCIMLastFileNumber
1638
4. Dragged this edited DCIM_APPLE.plist over the one on the iPhone.
Seems to work.
November 21st, 2011 at 14:39
Note in post 10, point 3, these comments don’t show XML markup so the plist fil should take the form at the top of this original post.
February 25th, 2012 at 01:52
My friend has a filename problem which is a little more strange, I think.
His iPhone gives every picture exactly the same name!
Is there a setting for the namegiving somewhere?
March 7th, 2013 at 05:28
I can confirm what mbeedub has described. It’s just important to reboot the iPhone after deleting those files:
/Media/PhotoData/Photos.sqlite
/Media/PhotoData/Photos.sqlite-shm
/Media/PhotoData/Photos.sqlite.wal
I have an iPhone 4S, iOS 6.1.2, Mac OS X 10.8.2.
I used these tools: “iFunBox” (file manager on Mac), and “Pref Setter”
March 9th, 2013 at 11:41
I’m also commenting to let you understand of the notable encounter my cousin’s child found reading through your web page. She came to find a lot of things, with the inclusion of how it is like to have an amazing coaching character to make many people very easily know certain specialized things. You actually exceeded visitors’ expectations. Many thanks for supplying the useful, safe, explanatory not to mention fun tips about that topic to Evelyn.
April 10th, 2013 at 12:50
WeThinkThatThey can’tTake hits for anything