PDA

View Full Version : Collision avoidance (unique numbering)



dennypage
December 12th, 2005, 08:36 AM
Hello,

I've been using BreezeBrowser for several years, and have just purchased downloader pro.

There is an important (critical) feature that I am unable to find in the tokens. What I am trying to achieve is deterministic, date based, file naming with collision avoidance. In BreezeBrowser terms, the format I want is:

%Y%m%D_%H%M%S-%u

The item that I am unable to find in DownloaderPro is the equivilent of the '%u' token that gives "Lowest number to give a unique name".

Yes, I can achieve collision advoidance with '%n1', but this results in a meaningless number, is not very deterministic (repeatable), and is downright ugly.

Any way to achieve my goal?

Thanks,

Denny

bencoman
December 12th, 2005, 04:38 PM
Hear Hear. I came looking for an answer to that same question and find it has just been asked. I am trialing DownloaderPro and missing such a token would be a show stopper for me, in which case I'll have to keep searching for the an app that does. However, if that feature is added, perhaps at the same time the "uniqueness token" could be made alpha as well as numeric. To avoid getting completely overwhelmed by numbers, my preferred naming would actually be...

20051211-173503.jpg
20051211-173704a.jpg
20051211-173704b.jpg
20051211-173824.jpg
20051211-173830.jpg

...which would work fine as long there weren't more than 26 photos in one second, or even better if it encounters a clash of more than 26 (eg in a minute), the existing 26 are automatically renamed again to have two-characters for the uniqueness field...

051211-1735.jpg
051211-1737a.jpg
051211-1737b.jpg
051211-1738aa.jpg
051211-1738ab.jpg
......
051211-1738az.jpg
051211-1738ba.jpg

Chris Breeze
December 13th, 2005, 09:13 AM
I'm sorry but it isn't possible for DLPro to do this because it keeps track of whether images have been downloaded already by checking the download filename. This has the advantage that if you accidentally try to download the same memory card twice the files will be shown as having been downloaded already and you won't get duplicates. The disadvantage is that DLPro can't generate a new filename to avoid a name clash and still keep track of previous downloads.

dennypage
December 13th, 2005, 07:53 PM
Chris,

Thanks for your response.

I'm a bit concerned about this. I had assumed that the duplicate check would do some intellegent checking (like file size followed by crc) in the event of potential name collision. If the duplicate download check is based solely on the literal file name, then it will fail in just about any variable based renaming scenarios.

In my case in particular, this means that dlp cannot provide rename support in the presence of subsecond frame rates. This is a rather significant limitation.

Variable (date)based renaming is why I chose dlp. Is there no possibliity of getting this working? I am more than willing to pay the speec hit for the crc. Perhaps as an option?

Denny

Chris Breeze
December 14th, 2005, 07:11 AM
DLPro does do a file size check but this can only be used if the file has not been modified. If the image has been auto rotated by DLPro, had IPTC data added, been modified by one of the plug-ins or edited using Photoshop then the file size or a CRC check can't be used to determine whether an image has already been downloaded.
If you are using a Nikon camera you can use %S to access the sub second time to give a unique number (unfortunately Canon and other manufacturers don't use this field). If you are using a Canon 1D series camera you can use %r8 to access the camera's internal counter to give a unique number for that camera body. With other cameras the only way to guarantee unique numbers when shooting at high frame rates is to use the image number assigned by the camera (%r) together with date and time. If you are shooting using more than one camera body you can use the camera mapping function in DLPro to add a unique prefix for each body.

It may be possible to add some sort of "uniqueness" token which generates unique filenames from the list of images on the memory card. One problem is this would give different filenames if you download a card, delete a few images from the card and then download the card again, but this isn't a normal scenario. Also it won't be able rename images to avoid collisions with files previously downloaded. These limitations shouldn't be a problem for normal usage and so this would be a useful enhancement. I will give this some thought, but it will be tricky because it needs to work with DLPro's duplicate file detection.

Naresh Koka
January 5th, 2006, 02:26 AM
Chris:

Would it be possible to provide the user the option to make the file name unique by continuing the counter (say for token '%n3') from the last counter used + 1?

I sometimes download several times a day and each time the counter starts at 001. Would it be possible to let the user specify if the files should be unique.

So say the first download for the day downloaded

2006_01_04_001.cr2
2006_01_04_002.cr2
2006_01_04_003.cr2

If I set the unique flag then the second download batch with photos from 2006/01/04 will download

2006_01_04_004.cr2
2006_01_04_005.cr2

instead of

2006_01_04_001.cr2
2006_01_04_002.cr2

Thanks

Chris Breeze
January 5th, 2006, 06:59 AM
Sorry I don't think it will possible to add this. The reasons why it is difficult to do this are somewhat technical and difficult to explain but basically DLPro would be unable to keep track of the filenames of downloaded files. You can use the "downloads today" token %R to prefix the image number with the download number. The value of %R is incremented when DLPro is closed after having downloaded at least one file. Next time DLPro is run the new value for %R is used if it is the same day otherwise it is reset to 1.

I have been working on adding "uniqueness" tokens which ensure all the download filenames on the memory card are unique. This does not check the download directory for existing files of the same name because DLPro has no way of knowing whether an exising file of the same name is a different file or the same file downloaded previously.

GuyScharf
January 6th, 2006, 12:15 AM
If you are using a Canon 1D series camera you can use %r8 to access the camera's internal counter to give a unique number for that camera body.
Is the %r8 for Canon something like what is recorded in Nikon EXIF as the shutter count? This is the count of total number of shutter actuations for the body. I'd find that useful as a token for use with Nikon cameras. It certainly gives uniqueness!

Thanks.

Guy

Chris Breeze
January 6th, 2006, 06:41 AM
I've only recently discovered how to decode this, but it does look as though it is the similar to Canon's image counter. Nikon appear to have added this to all DSLRs from the D70 onwards whereas Canon only store the value for their 1D series cameras. I will make this available in the next release.

pat.kane
April 22nd, 2006, 11:17 PM
I'm evaluating DLPro and have run into the problem mentioned by dennypage and bencoman.

Any progress on the "uniqueness" token?

My workflow uses Exifer to rename the images after downloading from my Canon 20D and wife's Rebel XT. Exifer elegantly adds -1, -2, etc. to the end of the filename for images shot within the same second. Nothing is added if no other images are shot within that second.

To get DLPro to work for me I used %Y%m%D-%t-%r1

With DLPro, I have extra characters on every filename, whether they need it or not. As Denny said, the workaround "results in a meaningless number, is not very deterministic (repeatable), and is downright ugly."

What DLPro looks like it will do quite well for me is to easily download and rename the images, embed some basic IPTC data (no XMP support?) and make a backup onto an external drive (haven't tried this yet). WOW, that should cut some time off the workflow.

Thanks,
Pat

Chris Breeze
April 24th, 2006, 06:05 AM
Downloader Pro can only allocate uniqueness numbers within the context of the current download. It isn't possible for it to check the destination folder for filenames and then allocate unique names for the current download because this would make it impossible to DLPro to keep track of which files have already been downloaded.
I'm currently working on XMP support for BBPro and plan to add it to DLPro.

jpwatters
April 24th, 2006, 11:35 AM
The only way that I have found to get unique file numbering is to copy all the files into a directory and then run downloader pro with a token like %Y%m%D-%t-%r1.

It doesn't work if you download a card at a time.

..jpw



I'm evaluating DLPro and have run into the problem mentioned by dennypage and bencoman.

Any progress on the "uniqueness" token?

My workflow uses Exifer to rename the images after downloading from my Canon 20D and wife's Rebel XT. Exifer elegantly adds -1, -2, etc. to the end of the filename for images shot within the same second. Nothing is added if no other images are shot within that second.

To get DLPro to work for me I used %Y%m%D-%t-%r1

With DLPro, I have extra characters on every filename, whether they need it or not. As Denny said, the workaround "results in a meaningless number, is not very deterministic (repeatable), and is downright ugly."

What DLPro looks like it will do quite well for me is to easily download and rename the images, embed some basic IPTC data (no XMP support?) and make a backup onto an external drive (haven't tried this yet). WOW, that should cut some time off the workflow.

Thanks,
Pat

pat.kane
April 24th, 2006, 06:55 PM
Downloader Pro can only allocate uniqueness numbers within the context of the current download.

OK, but what I'm questioning is the need to add a uniqueness number to every filename, even when it's not required. For example, I want this

20060424-113801.jpg
20060424-113803.jpg
20060424-113804-1.jpg
20060424-113804-2.jpg
20060424-113804-3.jpg
20060424-113805.jpg

instead of this

20060424-113801-1.jpg
20060424-113803-2.jpg
20060424-113804-3.jpg
20060424-113804-4.jpg
20060424-113804-5.jpg
20060424-113805-6.jpg

If it is possible to do this now, can you tell me how?

If not, I believe that my request and those of the other people in this thread was for this to be considered for a future release.

Thanks,
Pat

pat.kane
April 24th, 2006, 06:59 PM
The only way that I have found to get unique file numbering is to copy all the files into a directory and then run downloader pro with a token like %Y%m%D-%t-%r1.

It doesn't work if you download a card at a time.

jpw,

Good info to know and thanks for sharing. I see that we're using the same rename token, which has really worked well for me, especially when I have images from more than one photographer to deal with.

I'm not a pro, but at our last family reunion, I was the one to collect images from everyone. What fun that was to sort out and correct the time differences. Next time I'm going to get everyone to set their time/date stamp to be the same!

Regards,
Pat

Chris Breeze
April 25th, 2006, 06:39 AM
OK, but what I'm questioning is the need to add a uniqueness number to every filename, even when it's not required. For example, I want this

20060424-113801.jpg
20060424-113803.jpg
20060424-113804-1.jpg
20060424-113804-2.jpg
20060424-113804-3.jpg
20060424-113805.jpg

instead of this

20060424-113801-1.jpg
20060424-113803-2.jpg
20060424-113804-3.jpg
20060424-113804-4.jpg
20060424-113804-5.jpg
20060424-113805-6.jpg

If it is possible to do this now, can you tell me how?

Try this:
%Y%m%D-%H%M%S_%l

pat.kane
April 25th, 2006, 07:14 AM
Eureka! (well, darn close to it). That is what I was looking for. The only exception being that I get

20060424-113804.jpg
20060424-113804_1.jpg
20060424-113804_2.jpg

instead of the filenames being _1, _2 and _3 respectively. I see that %L would give me what I want, but it adds the number to every filename, not just the ones that need it. I can live with the above.

Funny thing is I looked at the documentation, but didn't see this. Where I looked was Preference Settings > Download Path. I suggest you provide a link there to the added detail under Filename and Directory Tokens. Now that I know the answer, it was easy to find.

Another question. You showed %H%M%S in your reply. Does %t not give me the same result?

Thanks,
Pat

Chris Breeze
April 26th, 2006, 05:54 AM
Yes %t and %H%M%S do give the same results. Sorry %l isn't exactly what you need, but it sounds pretty close.

pat.kane
April 26th, 2006, 06:11 AM
In this case, close is going to be good enough. Thanks for pointing me in the right direction.

Lars Holst Hansen
May 16th, 2006, 12:42 PM
I'm sorry but it isn't possible for DLPro to do this because it keeps track of whether images have been downloaded already by checking the download filename. ...
But you only have to change the job code (or any thing in your file naming rule) to make this NOT work :( Therefore I do not find this "check" useful at all, and IMOH it could very well be sacrificed to avoid name collisions.

Bob
December 4th, 2006, 06:33 PM
I'm currently demo-ing the DLPro application. I saw a request for the ability to use a letter instead of a number for uniqueness. Was this ever implemented, I do not see it anywhere but just wanted to make sure I'm not missing it since it's a show stopper for me. If it has not been implemented are there any plans to include it in a future release?

DavidB
December 5th, 2006, 12:00 AM
I'm currently demo-ing the DLPro application. I saw a request for the ability to use a letter instead of a number for uniqueness. Was this ever implemented, I do not see it anywhere but just wanted to make sure I'm not missing it since it's a show stopper for me. If it has not been implemented are there any plans to include it in a future release?

I am intrigued: why is it a show-stopper? I could understand a preference, or a matter of taste, but the only reason I can think of for the issue being a real show stopper is if you are tied to someone else's data structure.

Letters have a particular limitation as uniqueness tokens; it all gets a bit hairy once you get beyond 26 variations on the theme ...

But your point is well made.

Bob
December 5th, 2006, 05:57 PM
Unfortunately the data structure is my own. I have a library of photos (about 20,000) which already use letters as the uniqueness variable. One reason is I found the letter to be easier to read alongside the plethora of numbers in the date/time info without adding another specific field for uniqueness.

The main reason however is I have some tools I wrote to parse the file names based on a couple delimiters(- and _) and if I switch to using a number I would have to change all my current photos or rewrite some tools to account for an increase in fields and change in the unique variable type.

2006-12-05_09-31-28_rb_description.jpg
2006-12-05_09-31-28a_rb_description.jpg
2006-12-05_09-31-28b_rb_description.jpg
would become
2006-12-05_09-31-28_rb_description.jpg
2006-12-05_09-31-28-1_rb_description.jpg
2006-12-05_09-31-28-2_rb_description.jpg

I never ran into a problem with not enough letters since I use seconds in my file name and I don't have a camera that can take more than 27 frames/sec. Although I would like to have that problem. :)

Robert

Chris Breeze
December 6th, 2006, 09:16 AM
I'm currently demo-ing the DLPro application. I saw a request for the ability to use a letter instead of a number for uniqueness. Was this ever implemented, I do not see it anywhere but just wanted to make sure I'm not missing it since it's a show stopper for me. If it has not been implemented are there any plans to include it in a future release?
This will be in DLPro v2.0 using the tokens {la} and {La}. The uniqueness letters will be 'a' to 'z' for 1 to 26, 'aa'=27, 'ab'=28, 'ba'=52 etc.

DavidB
December 6th, 2006, 04:34 PM
This will be in DLPro v2.0 using the tokens {la} and {La}. The uniqueness letters will be 'a' to 'z' for 1 to 26, 'aa'=27, 'ab'=28, 'ba'=52 etc.

I think this makes everyone happy. I get the difficulty resolved before I even thought of it and Bob can (I assume) maintain his chosen structure by installing the beta of 2.0, which (judging by the lack of complaints in recent weeks) is now pretty stable.

One question. Will the new tokens in DL Pro also find their way into BB Pro, for file renaming purposes?

Chris Breeze
December 7th, 2006, 09:34 AM
I haven't really decided yet whether to include similar renaming tokens in BBPro. Batch rename in BBPro does a slightly different job from DLPro and I don't think anybody has ever requested it in BBPro before.

DavidB
December 7th, 2006, 06:47 PM
I haven't really decided yet whether to include similar renaming tokens in BBPro. Batch rename in BBPro does a slightly different job from DLPro and I don't think anybody has ever requested it in BBPro before.

I understand that you have plenty to do, but I suggest that the issue is worth considering.

I agree that naming on download and batch renaming are different jobs. However they may both be used for a common purpose, which is to sustain a systematic file naming system, such as the one described by Bob in his post.

In these circumstances, possible reasons for commonality in the approach are:

a common user interface, which is helpful to users who switch between the two programs;
a common set of capabilities, which ensures that, so far as possible, a naming scheme which is established on download can be maintained when renaming (useful if one finds, perhaps for reasons outside one's control, that the naming scheme has to change and old files have to be renamed in the new scheme).


I'd be interested to know if others have views on this issue.