Reset File numbering - Hello, I'm a NEWBIE - HELP!! (Newbies assistance, User Guides and thank you notes) - CHDK Forum

Reset File numbering

  • 8 Replies
  • 6729 Views
Reset File numbering
« on: 29 / June / 2009, 14:10:27 »
Advertisements
Hi,

I have ixus860IS workin with CHDK. I have reset the file numbering by error !!!!
Is it possible to set the file number counter via script ?
For example I will start the file number at 1200 => take photo with IMG_1200.jpeg....

Regards
Laurent

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Reset File numbering
« Reply #1 on: 29 / June / 2009, 14:40:16 »
Short answer: No, not that I know of.

Long answer: That file counter position is likely stored in a parameters area that is accessible to us but hasn't been experimented with much. It's likely that this is possible relatively easily if someone finds the time and motivation to poke around long enough.

Side note: There's not much point in using the camera's builtin IMG_???? numbers for much of anything, mostly because the count wraps around every shots 9999 (and then the camera creates a new xxxCANON directory under DCIM).

Re: Reset File numbering
« Reply #2 on: 29 / June / 2009, 14:58:53 »
In shooting.c are the following functions :-

Code: [Select]
long get_file_next_counter()
{
    return ((get_file_counter()>>4)+1)<<4;
}

long get_target_file_num()
{
    long n;
    n = get_file_next_counter();
    n = (n>>4)&0x3FFF;
    return n;
}


long get_target_dir_num()
{
    long n;  
    n = get_file_next_counter();
    n = (n>>18)&0x3FF;
    if (get_target_file_num()%100 == 1) ++n;
    return n;
}


I did try implementing the suggested script function some time ago but did not get it to work.
I do not know if there is a function to set the file counter.


David
« Last Edit: 29 / June / 2009, 15:03:06 by Microfunguy »

Re: Reset File numbering
« Reply #3 on: 29 / June / 2009, 18:59:01 »
The easiest way to set picture numbering at the file-number of your choice is to:

Put card in a card-reader.

If you have images on your card, remove all images from that card's image folder except for one image.

If you have no images on your card, put any image taken with that camera back on the camera in the same folder it is presently using to store images.

Rename that one file to 1 number less than the number you want to start it counting from.

Put the card back in the camera.

Take a picture.

The next picture you take will be named at the following number.

Delete first photo, or both, if the one you shot is just a test shot.

Your camera will now keep counting as you want it to. Provided that you haven't set the camera's own functions to reset to 0000 each time. This method has worked on every digital camera I've ever tried it on. It should work for yours too.



Re: Reset File numbering
« Reply #4 on: 29 / June / 2009, 19:39:00 »
Hi NewbieToobie,


You are the king  :lol

Your procedure work very nice on my camera Canon Ixus 860IS.

Thamk you verymatch for your prompt reply

Enjoy
Regards
Laurent

Re: Reset File numbering
« Reply #5 on: 09 / August / 2009, 13:42:23 »
hi all,

 it works for me too with my A720 IS.
As my file numbering is aroung 4000, I wonder if CHDK can help me to have a different file naming. for example, image AND movies called IMG_xxxx instead of having a "MOV_xxx". Also can it be possible to avoid the wrapping after 9999 ?

best regards,

*

Offline fe50

  • ******
  • 3152
  • IXUS50 & 860, SX10 Star WARs-Star RAWs
    • fe50
Re: Reset File numbering
« Reply #6 on: 09 / August / 2009, 14:04:20 »
Hello & welcome, iostrym !
As my file numbering is aroung 4000, I wonder if CHDK can help me to have a different file naming. for example, image AND movies called IMG_xxxx instead of having a "MOV_xxx". Also can it be possible to avoid the wrapping after 9999 ?
No, the naming of the JPG images is done by the Canon firmware, following the Design rules for Camera File systems.

But it's easy to create new folders...
You could do it manually, but it's easier to do it with the Canon menu:

Select "Create Folder..." from the Canon tools menu and enable "Create New Folder" there,
then leave the menu; now you see the "New Folder" sign on the Canon OSD.
After the next shot you'll see the new folder on the card, the JPEGs will be stored there.

Re: Reset File numbering
« Reply #7 on: 06 / September / 2010, 07:01:36 »
Hello ,
I tried to set the image file counter by :

long v = 0 ;
set_arameter_data (PARAM_FILE_COUNTER, &v, 4);

but it does not take effect , I am wondering why


Re: Reset File numbering
« Reply #8 on: 06 / September / 2010, 08:46:23 »
As my file numbering is aroung 4000, I wonder if CHDK can help me to have a different file naming. for example, image AND movies called IMG_xxxx instead of having a "MOV_xxx". Also can it be possible to avoid the wrapping after 9999 ?
As fe50 notes, the on-card names need to comply with the DCF spec.

But in any case this is something that applies to all cameras, and it's something that we all (photographers worldwide) deal with. The best way to think about it is that these names generated by the camera are only to stop filename collisions on the card. They are NOT going to be unique once they're on your computer.

Normal routine is to rename the files as they're being copied to your computer, using names that are going to be unique. At some point your camera will wrap around from IMG_9999 to IMG_0001, as will all of your other cameras. And if you use more than one camera and ever swap flash cards you can find that you can get two sets of files on the same day with the same filenames! By renaming the files as they're copied to your system (Bridge, Lightroom, Aperture, etc all have this function in their download/import routines) you can convert these per-card filenames to ones that will not collide. Even by just putting the date/time of the photo as the start of the new filename you can make them unique.

Also keep in mind that the filename number does NOT necessarily indicate how many photos the camera has taken. The camera-generated filenames are not very useful by themselves.
Even if you're only using one camera at the moment, get used to this setup and you'll be able to avoid pain when you DO start using a second camera.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal