Back to my homepage – Hans-Georg Michna
Changing the Panasonic Lumix DMC Picture Counter
Works for the FX, FZ, and TZ series, with additional info on G3, GF, FS
Last change: 2015-02-10
The Panasonic Lumix DMC-FZ1, Panasonic Lumix DMC-FZ2, Panasonic Lumix DMC-FZ3, Panasonic Lumix DMC-FZ5, Panasonic Lumix DMC-FZ7, Panasonic Lumix DMC-FZ10, Panasonic Lumix DMC-FZ20, and other digital cameras count the picture file names upwards, first from P1000001.JPG to somewhere around P1000900.JPG. Then they create a new folder, next to U:/DCIM/100_PANA/ they automatically create a U:/DCIM/101_PANA/ and fill it with picture files beginning with P1010001.JPG. (Your memory module's drive letter may not be U:. It may be D:, or E:, or any letter.)
The camera has a function to reset the picture counter, but that picture only resets the last three digits. The camera never wants to forget the first three digits, the ones that correspond to the folder.
However, you may wish to influence that first counter. For example, you may have bought a used camera and want to reset that counter to 100, or you may want to synchronize the counter with the actual year if you take less than some 900 photos per year.
I've tried removing the battery from the camera for three days, but the camera never forgets. It seems to have another, internal buffer battery that also serves to keep the camera's clock running.
Then I read about an ingenious method to change the counter upwards and even downwards. It seems that the camera always looks for the highest numbered file in the folder and adds one for any new picture you take. When the highest numbered file reaches somewhere near 900, the camera automatically creates the next higher folder and resets the last three digits of the picture file name to 001.
We can exploit this behavior to influence the camera's counting.
Before you begin, charge the camera's battery or use external power. It may not be a good idea to shut down the camera in the middle of the procedures described below.
If you want to reduce the folder counter, keep reading. If you only want to increase the counter, skip to the next chapter.
Here's what I did with full success on a Windows XP computer. Note that you probably need a memory module with at least 16 MB, otherwise you have to work with a smaller number of folders and do the procedure in several steps.
|0.||Either connect the camera to the computer or plug its memory module into a suitable reader on the computer. Before you begin to make modifications, copy all valuable pictures out of the memory module, format it in the camera (use the menu and select the format command), then take one photo.|
|1a.||Open a command line window (run cmd), navigate to the DCIM folder. Example
with U to be replaced by the drive letter of your memory module in the camera:
Then enter the following command:
If you want put this command into a batch file and execute it from there, you have to double each percent sign, i.e.: for /L %%a in (100, 1, 999) do md %%a_PANA
Actually you need only the folders with numbers above your last one, but the others don't hurt, so don't bother to change the first number.
This works in Windows NT, 2000, XP, 2003, but not in Windows 98 and probably not in Windows ME either.
|1b1.||Alternatively, using Visual Basic Script (using the Windows Scripting
Host), copy the following text into a text file named: MakeFolders.vbs
If Msgbox("Click on OK to create folders.", _
vbOkCancel, "Start message") = vbOk Then
Set fsO = CreateObject("Scripting.FileSystemObject")
For i = 999 To 100 Step -1
fsO.CreateFolder i & "_PANA"
If you don't need the start message, you can use the even shorter program:
Set fsO = CreateObject("Scripting.FileSystemObject")
|1b2.||Copy this file into the DCIM folder on the memory module in the camera.|
|1b3.||Double-click on it or select it and press return, then wait until you
get an error message (file or folder already exists) when it hits your last
existing folder. Be sure to double-click or press return only once, the
program runs invisibly (except for wscript.exe showing up among the processes
in Task Manager and the folders actually showing up on the memory module).
It takes a few minutes (with very low processor load). There you have your
folders up to 999_PANA.
If you get an error message immediately, saying that this file type is not known, then you don't have the Windows Scripting Host installed and either have to install it or use another method to create the folders, like a long batch file that you can create almost automatically in Excel, for example.
|2.||Go into the folder on your memory module in which your last picture resides. Rename that picture and change the last three digits of the file name before .JPG to 999. (Example: P1050999.JPG). You may also copy any picture file and rename the copy if you prefer.|
|3.||Click on the safe hardware removal icon in the system tray (lower right) and select the device carrying the memory module, i.e. the camera or reader, to remove it. Then unplug the camera or unplug the reader and put the memory module back into the camera. Take one picture.|
|4.||Switch the camera to picture review mode (green icon) and wait again. (By the way, after the wait you can already see the new number on the camera's display if the display mode is set to display the picture number. It should be 100-0001.)|
|5.||Make sure you have no valuable pictures still in the camera, then format the card in the camera. (Menu button, up, right, left, down).|
Note that it is not necessary, contrary to some earlier statements, to create a picture file one number higher than the actual one. One that ends with 999.JPG is enough.
If going back to 100_PANA and P1000001.JPG was more (or less, rather) than you wanted, keep reading and increase the counter with the following procedure.
If you have any valuable pictures on the memory modules, copy them out.
|1.||Connect the memory module to the computer. Go into the folder on your memory module in which your last picture resides. Rename that picture and change the last three digits of the file name before .JPG to 999. (Example: P1000999.JPG)|
|2.||Create additional folders in a sequence without gaps. Example: 101_PANA,
102_PANA, etc. But do not create the folder you really want. Stop short
For example, if you really want 104_PANA then create the folders between your current one and 104. (Example: 101_PANA, 102_PANA, and 103_PANA) But do not create 104_PANA, because the camera will create 104_PANA automatically.
|3.||Click on the safe hardware removal icon in the system tray (lower right) and select to remove the camera or the memory module reader. Then unplug the device, make sure the memory module is in the camera, and take one picture.|
|4.||Switch the camera to picture review mode (green icon). (By the way, you can now already see the new number on the camera's display if the display mode is set to display the picture number. It should be 104-0001 in our example.)|
|5.||Make sure you have no valuable pictures still in the camera, then format the card in the camera..|
If you want to advance the last three digits, just rename (or copy and rename) any picture in the memory module and give it the desired filename minus 1. The next picture will get the desired number. For example, if you have only P1040001.JPG, but want the next picture to be P1040500.JPG, create a picture file with the name P1040499.JPG.
If you want to reduce the last three digits, use the RESET NUMBER command in the camera menu, then advance the number as described above.
If you find any inaccuracies, corrections, possible improvements, better or more hints, please drop me an email.
Apparently valid for the Panasonic DMC-TZ1, DMC-TZ2, DMC-TZ3, and DMC-TZ4 cameras.
2007-04-20 – Bill Rymer wrote his very useful findings. Thanks a lot!
Use a PC to create placeholder folders in the media SD card with names of the form 100_PANA, 101_PANA, etc. as far up as desired.
If necessary, reinsert the SD card in the camera. Immediately use the "Number Reset" function. That creates a new folder in the sequence at the next higher number. Then any future pictures taken while that card is present in the camera are stored in appropriate numerical sequence. Just like normal, but with the higher number names. Problem solved.
If you don't have an SD card adapter on the computer, I suppose that you could also connect the camera, with the SD card inserted, to the computer via USB and create the folders thus.
If anybody can confirm that the procedure worked, please send me an email. I would also like to know whether it works in cameras other than the DMX-TZx.
2007-06-20 – The Baer Family wrote:
I haven’t tried it on my TZ3 yet, because I don’t get this camera until tomorrow. However, I was successful with an FX8 and two LZ7s.
We have 5 Panasonic digital cameras (including the TZ3 that is coming tomorrow). I wanted to start my kids’ cameras at 600, 700, and 800 in their sequencing, so that they do not have duplicate file numbers with my cameras. I followed your directions, with a few modifications, as shown below…
1) I created a temporary folder on my computer, with all the 100_PANA, 101_PANA … up to 799_PANA. Each series (100, 200, 300, etc.) was in a separate sub-folder. This was very time consuming. However, I found that I could make use of some shortcuts in creating the folders, like copying all the 100_PANA … 199_PANA to a 200 folder, and then just changing all the 1’s to 2’s, where 100_PANA became 200_PANA, 101_PANA became 201_PANA.
2) I was not successful copying all the folders to the card at one time. I needed to separate by series, first completing 100_PANA … 199_PANA, etc.
a. First I took one picture
b. Then I put the SD card in my computer
c. I copied 100_PANA … 199_PANA to the SD card
d. In the 100_PANA folder, I included a jpg called P1000999.jpg
e. All other folders were empty (this is important)
f. Then I put the card back into my camera and took a picture
g. I verified that the picture was in the 200 sequencing
h. I formatted the card
i. Put the card back in my computer
j. Copied 200_PANA … 299_PANA folders to the SD card
k. In the 200_PANA folder, I included a jpg called P2000999.jpg
l. All other folders were empty (this is important)
m. Then I put the card back into my camera and took a picture
n. I verified that the picture was in the 300 sequencing
o. I formatted the card
p. Then I continued this process until the camera was sequencing at P8000001 for the file name in 800_PANA folder.
Then I repeated this process for the other two cameras, stopping at 700_PANA and 600_PANA.
Thanks for this information. Although it took me a LONG time to finish this, it will be very helpful for our files.
I read the information about the TZ3. Since I don’t have the camera yet, I wasn’t sure what the difference was between the other cameras. I’ll try that tomorrow. Luckily, I only want to go the 300_PANA for the TZ3!
2008-12-24 – Tom Saul wrote:
Works on TZ5. I hooked up to computer via USB cable, noted the drive, then used the following command to create the folders (from a command prompt)
for /L %i in (101,1,399) do md <drive>\DCIM\%i_PANA
I had a file P1000999.jpg in the 100_PANA folder, took a picture, and it came out in 400_PANA. Note that the 399 above can be changed to reflect the number one below the desired new folder number.
2009-01-09 – Matthew Ocwieja wrote:
Found your website doing a google search for “panasonic set photo number”. I used the Modified procedure for DMC-TZx cameras to set the picture number on my new TZ4 so that it wouldn’t overlap with the pictures I’m taking on my FZ50. Specifically, I did the following:
1) Took a picture on the TZ4 (P1000001.jpg) 2) Took the card from the camera and put it into the card slot in my laptop. 3)
From a Windows cmd line, with the card’s \dcim as my working directory, ranfor /L %a in (100, 1, 599) do md %a_PANA
(from your DMC-FZx step-by-step instructions).
4) Put the card back in the TZ4 and performed a number reset. 5) Took a picture: it was saved as P6000001.jpg.
Now I’d have to take another 595,000 pictures on my FZ50 before I run into any duplicate filenames!
Thanks so much for your helpful site,
2009-05-02 – Daniel Fuchs wrote:
My TZ4 went from 103_PANA to 104_PANA without asking for permission. (It started with 103, because I had folders on the card that were created by two other cameras I tested in the shop.)
After one or two unsuccessful tries, here's what worked to reset the folder counter back to 104 in one go:
- Save picture folder externally, format card.
- Create 999 folders from the command line.
- Copy a file with "999" at the end into the 104_PANA folder
- Delete the 103_PANA folder. (I found out that after creating 999 folders, the cam could not create a new one unless I deleted the first one)
- Take a picture -> 1030001 in a newly created 103_PANA folder. ;-) Success.
- Format card again.
- Copy the original 103_PANA folder with the pictures back onto the card. Next picture neatly fit into the folder right after the last one.
I don't know why the cam went to 104 after less than 200 pictures, but so what. At least the numbering is not so completely idiotic as I've seen on an Olympus compact cam.
2009-07-31 – Don wrote that the same procedure worked on his DMC-FX37.
Thanks for the good information!
2010-04-24 – Clark & Marty Allen wrote:
Several years ago we followed your Panasonic renumbering method [...] for our TZ3s. Today, we were able to follow essentially the same procedure (specifically, Matthew Ocwieja 2009-01-09) on our ZS3 and ZS7. Still works like a charm! Again, thank you for discovering/documenting this process and allowing everyone to give their comments. It would be an absolute nightmare trying to manage these cameras without it!!
2011-03-15 – Philip wrote:
The new TZ20 has two separate reset functions to zero the counters – one to reset the file numbering and one to reset the folder numbering. The old tips to increase file numbering and folder numbering still work just fine on the TZ20.
2011-05-15 – Larry wrote:
Thanks for the info I found on the WEB to change the counter. I was at P1050711 when I bought a new FZ-35. The procedure did not work as listed, because I let the new camera create P1000001 before I tried your procedure. I also had to set this to P1000999 along with P1050999. The camera did not care that I had just a full P105 folder.
Your procedure works if the steps are done to the memory stick before the new camera makes a directory as I did. Once it makes a directory, it appears that this directory and the last directory need to be at 999. In-between directories can be blank. I'm sure there are going to be users that will let the camera make a directory first and then will want to change counter afterwards.
2011-06-08 – Snowy (Andrew Snowdon) wrote from Australia:
I have a new DMC-ZS10 (AKA TZ20) as well as a TZ3. It disturbed me that I was accumulating the same file number which renders 'sort by filename' rather meaningless.
Your instructions worked fine on the ZS10 and I'm now shooting 500-0001 and so on. Took me about an hour to get my head around it all.
By the way, the instructions for this new model say under the heading No. Reset, "A folder number between 100 and 999 can be assigned." It turns out this means 'will be assigned' as the only user option is to reset to 100.
2011-09-09 – Les Haig, a Scotsman living in Atlanta, GA, wrote:
I've appreciated the information contained in your above article. I was looking for a solution to change the folder numbers used in my Panasonic G3. As others have found, if you have more than one Panasonic camera you soon notice conflicting file names.
Unfortunately, for one reason or another I was unable to find any of the solutions which you had detailed worked for me. However … I found that by taking one picture and then activating the "No. Reset" in the Setup menu, this forced a folder change (e.g. from 100_PANA to 101_PANA). It's little laborious but you can quickly get into a rhythm—press shutter, press Menu 3 times, press up then Menu again—then repeat for as long as you have the patience. Without too much trouble you can soon get the folder numbers into territory well clear of those in your other cameras.
I'd guess that a similar procedure will probably work in other G series cameras and perhaps also the GF series, so possibly the above approach might be of interest to others. The manual does not seem to give clear guidance—so what's new?
2012-02-19 – Patricia Hughes wrote:
Hi there! Thanks very much for all the help in resetting filenames. I have a DMC-FS10, and this apparently doesn't have a Number Reset function (if anyone can tell me there is one and where it is I will be grateful!). I had already reached P1020565 and decided to change up to P500nnnn to avoid confusion with photos from my FZ38. After various failures, this is what worked for me:
- Took the card from the camera and put it into the card reader on my desktop.
- From a Windows cmd line, with the card's \dcim as my working directory, ranfor /L %a in (100, 1, 499) do md %a_PANA
(from your DMC-FZx step-by-step instructions).
- Renamed P1020565 to P1020999
- Copied a picture to the 499_PANA directory created in step 2 above.
- Renamed the picture to P4990999
- Put the card back in the FS10
- Took a picture: it was saved as P5000001.jpg.
Many thanks for Larry (2011-05-15) for his advice about needing a 999 file in the "original" directory and in the new last directory.
2012-11-22 – David Maden wrote the following page, which refers primarily to the Panasonic DMC-FS35 and to Linux. Thanks, David!
2014-06-06 – Caroline Morris wrote:
thank you for your brilliant blog. I have an update.
I wanted to say that the instructions for changing the Panasonic Lumix picture counter on page 3 of your blog under the heading of "Modified procedure for the DMC-TZx cameras" is still valid for the new 2014 Lumix DMC-TZ60.
Specifically I followed Tom Saul's instructions (dated 2008-12-24) and changed the camera numbering system so my old Panasonic pictures are not duplicated with the same numbers on the new camera. I started numbering at P3000001. By the way, the computer commands required are in the old DOS language!
Hope this e-mail gets to you,
2015-02-10 – Mark Stonich wrote:
The method shown there is what I had done before, to start my FZ150 at P1500001.JPG.
Too much work as I wanted to start my FZ1000 @ P2000001.JPG and my next camera, a ZS50, @ P3000001.JPG. So I tried something that seemed too easy. But works, at least on the FZ1000 (and hopefully on the ZS50/TZ70).
I formatted an SD card and took one photo.
Put the card in my Mac and renamed the folder to 199_PANA and the photo to P1990999.JPG ignoring all previous folder numbers.
Put the card back in my FZ1000 and took a few shots that ended up being named P2000001.JPG …P2000004.JPG in folder 200_PANA
Deleted everything on the card in my Mac and then re-formatted it in the camera. Next shot was P2000005.JPG in folder 200_PANA
I think I’ll have to be careful that, with 3 Panasonics, I don’t use a card that’s been in another camera without re-formatting it.
Mark later added that, sadly, this procedure does not work on the ZS50.
2015-09-25 – Hugh Phillips wrote:
I just wanted to report that the method of 2007-04-20 – Bill Rymer worked perfectly for my new DMC-ZS50. Like most others interested in your post I want to keep the filenames of pictures from this camera from overlapping with photos taken on a previous camera that went toast.
After taking one picture with the camera with an SD card inserted I hooked it up to my PC via the USB cable, found picture P1000001.jpg in folder 100_PANA, created new directories 101_PANA, 102_PANA … 104_PANA, disconnected from the PC, then on camera used Menu, Setup, No. Reset. The next picture taken was P1050001.jpg in folder 105_PANA, just like I wanted.
2015-11-25 – Jean-Claude Schwartz wrote:
It works also for the TZ71! I reused the SD card from my previous TZ5 which contained folders from 117 to 122_PANA, and the new camera started again with 100_PANA… The camera guide only says that the picture file numbers can be reset to 001 and the folder number can be reset to 100, and also that a folder number between 100 and 999 can be assigned, but no detail about how.
However it's not possible to create new folders 101_PANA to 116_PANA on the camera, access denied!
So I just reset the file numbers and took 1 picture, this created the next folder 102_PANA, file number 001, then reset again the file numbers and took 1 picture, etc until 116_PANA, file number 001. After the next file numbers reset, the next picture was in 123_PANA. Et voilà.
2016-11-18 – Chris <cr©orcon.net.nz> wrote:
I was trying to reset the counter on my new TZ-57 and I found your page - for which many thanks. Your procedure works.
Specifically, I wanted the TZ-57 to carry on from where my old TZ-20 left off. The last card in my TZ-20 had directories from 139_PANA to 141_PANA I put that in the TZ-57 and it promptly restarted at 101_PANA - NOT what I wanted.
So I put the card in a USB card-reader attached to my computer and, in the file manager, created additional directories 102_PANA to 138_PANA, copied a couple of JPG's into 102_PANA and renamed them 'P1020998.JPG' and 'P1020999.JPG' (and similarly for each other directory including 101_PANA). (This was in Debian Linux. I didn't bother trying to write a Bash script to automate it. A similar procedure would doubtless work for Windows).
Then put the card back in the camera and voila! - the TZ carried on numbering from the last photo in 141_PANA.
I suspect only the last JPG e.g. P1020999.JPG in each directory is actually necessary, but I copied two just to make sure.
2017-03-25 – Dan Leigh wrote the following from the UK, which made me change the original text at the top to reflect the fact that one can either plug the camera into a computer via USB or plug the memory module into a reader and connect that to the computer. Thanks, Dan.
I just had my Panasonic LX100 serviced (debris/dust on sensor only) and after collecting it from the repair shop the images all had a new filename prefix of P514-, where it had been P100-, approaching 890 files in that folder. So it suddenly looked like I'd taken over a half a million photos in just a few months. It had jumped from P1000887.JPG to P5140001.JPG, and created the 514 folder.
Your method 1 followed by a number readjustment - changing digits - worked. However, I did try a couple of shortcuts which led to dead ends (I got a new 515 folder instead of the 100 one I wanted, maybe threw in a format or forgot to do the number reset), but it worked in the end, so thank you very much.
One thing that led to some confusion was that I never plug my cameras into my computer via USB. I pop the SD cards into card readers. It didn't matter, but I had to think about the word "unplug" for a minute. There should have been a "plug" in a previous paragraph. Like an HTML mistake.
Anyway, it worked on the LX100. I did a batch rename on the photos with the P514- prefix, in the correct numeric sequence, and subsequent photos did not revert back to the P514- or P515-, but carried on with the correct sequence. I am hoping that when the P100 folder is full (999) it creates a P101 folder.
If you want to change the photo file names later and cannot achieve what you want with the normal rename command, check the little helper program regexprename.vbs. For simple renaming purposes it is easy to use, but more advanced usage requires knowledge of regular expressions.
Back to my homepage – Hans-Georg Michna
hits since 2007-11-01
Free PHP scripts by PHPJunkYard.com