Author Topic: Missing code in Code Replacements  (Read 4788 times)

Offline karlmz

  • Member
  • **
  • Posts: 77
    • View Profile
Missing code in Code Replacements
« on: February 28, 2009, 03:34:32 AM »
Hi,

I rename my images during ingest with {year4}-{month0}-{day0} ={model}=_{frame4}, where "=" is used as delimiter character for code replacement. For instance, with this scheme DSC_3589.NEF becomes 2009-02-24 D90_3589.NEF instead of the longer 2009-02-24 NIKON D90_3589.NEF.

However, there is a problem with the D90 video files with this naming scheme; they end up named like for instance 2009-02-24 ==_3589.avi. Missing code problem?

OK, the new feature in PM 4.6 with a default replacement string for missing codes in Code Replacements should fix that, I thought. So I put D90v in the box for Default replacement, and tested this by renaming a video file by using the same renaming string as at ingest (see above). It did not work. ={model}= still showed as == instead of D90v.

Is there a bug or have I misunderstood the use of the default replacement string?

Regards,

Karl

PS. Running WinXP Pro SP3, PM 4.6
« Last Edit: February 28, 2009, 04:03:17 AM by karlmz »

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24763
    • View Profile
    • Camera Bits, Inc.
Re: Missing code in Code Replacements
« Reply #1 on: February 28, 2009, 07:13:05 AM »
Karl,

I rename my images during ingest with {year4}-{month0}-{day0} ={model}=_{frame4}, where "=" is used as delimiter character for code replacement. For instance, with this scheme DSC_3589.NEF becomes 2009-02-24 D90_3589.NEF instead of the longer 2009-02-24 NIKON D90_3589.NEF.

However, there is a problem with the D90 video files with this naming scheme; they end up named like for instance 2009-02-24 ==_3589.avi. Missing code problem?

OK, the new feature in PM 4.6 with a default replacement string for missing codes in Code Replacements should fix that, I thought. So I put D90v in the box for Default replacement, and tested this by renaming a video file by using the same renaming string as at ingest (see above). It did not work. ={model}= still showed as == instead of D90v.

Is there a bug or have I misunderstood the use of the default replacement string?

It might be a bug.  Can you send me a sample video file (just shoot a really short one of a wall)?  Please click on my name to the left of this message, then click on the 'personal message' link.  I will respond with upload instructions.

-Kirk

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24763
    • View Profile
    • Camera Bits, Inc.
Re: Missing code in Code Replacements
« Reply #2 on: February 28, 2009, 11:35:04 AM »
Karl,

I rename my images during ingest with {year4}-{month0}-{day0} ={model}=_{frame4}, where "=" is used as delimiter character for code replacement. For instance, with this scheme DSC_3589.NEF becomes 2009-02-24 D90_3589.NEF instead of the longer 2009-02-24 NIKON D90_3589.NEF.

However, there is a problem with the D90 video files with this naming scheme; they end up named like for instance 2009-02-24 ==_3589.avi. Missing code problem?

OK, the new feature in PM 4.6 with a default replacement string for missing codes in Code Replacements should fix that, I thought. So I put D90v in the box for Default replacement, and tested this by renaming a video file by using the same renaming string as at ingest (see above). It did not work. ={model}= still showed as == instead of D90v.

Is there a bug or have I misunderstood the use of the default replacement string?

Thanks for the file.  There is no bug though I suppose the description of the 'Default replacement:' field in the Code Replacement dialog could be more descriptive.  That text is used when a code is looked up and there is no corresponding replacement.  Since the {model} variable evaluates to nothing at all it is not treated like a missing replacement.  Blank is blank, there is no code to look up.

-Kirk

Offline karlmz

  • Member
  • **
  • Posts: 77
    • View Profile
Re: Missing code in Code Replacements
« Reply #3 on: February 28, 2009, 11:44:17 AM »
Thanks, Kirk. I understand. Can you think of any trick I can use to get the video files named the way I want at ingest (e.g., 2009-02-24 D90v_3589.avi)?

Karl

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24763
    • View Profile
    • Camera Bits, Inc.
Re: Missing code in Code Replacements
« Reply #4 on: February 28, 2009, 12:17:31 PM »
Karl,

Thanks, Kirk. I understand. Can you think of any trick I can use to get the video files named the way I want at ingest (e.g., 2009-02-24 D90v_3589.avi)?

You could use {type} which would return 'WAVI' for your AVI files and then create a code replacement entries like this:
WAVI     D90
JPEG      D90
NNEF     D90

Come to think of it, users who wanted to segregate their photos from their videos could use this method as well and use it for folder creation in Ingest.  Instead they would use the {type} variable with surrounding code replacement delimiters but with these codes and replacements:
WAVI     Videos
JPEG      Photos
NNEF     Photos
CCR2     Photos

HTH,

-Kirk

Offline karlmz

  • Member
  • **
  • Posts: 77
    • View Profile
Re: Missing code in Code Replacements
« Reply #5 on: February 28, 2009, 12:40:23 PM »
Worked like a charm! Thank you!

Karl

Offline karlmz

  • Member
  • **
  • Posts: 77
    • View Profile
Re: Missing code in Code Replacements
« Reply #6 on: February 28, 2009, 01:26:44 PM »
Kirk,

What if one uses different cameras and want to include the camera model in the file name? Then the code replacement for for instance JPEG would need to be able to pick camera model. Is there a way that a code replacement could be a variable, in my case ={model}=, which is another code replacement? In other words, is it possible to have nested code replacements?

Karl

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24763
    • View Profile
    • Camera Bits, Inc.
Re: Missing code in Code Replacements
« Reply #7 on: February 28, 2009, 01:42:17 PM »
Karl,

What if one uses different cameras and want to include the camera model in the file name? Then the code replacement for for instance JPEG would need to be able to pick camera model. Is there a way that a code replacement could be a variable, in my case ={model}=, which is another code replacement? In other words, is it possible to have nested code replacements?

No, but you could expand two variables in the replacement delimiters like ={model}{type}= which for your D90 shooting NEFs would become:

NIKON D90JPEG

You could use that as a code and add the replacement you need.  And now in version 4.6 you can have multiple replacements for a given code so for the above example you could do this:

NIKON D90JPEG    Photos    D90    Something else
NIKON D90NNEF   Photos    D90    Something else

And to access the additional replacements you would do the following

={model}{type}#1= -> Photos  (you can leave off the "#1" if you want to)
={model}{type}#2= -> D90
={model}{type}#3= -> Something else

Anyway I hope this helps explain things a bit more.

-Kirk

Offline karlmz

  • Member
  • **
  • Posts: 77
    • View Profile
Re: Missing code in Code Replacements
« Reply #8 on: February 28, 2009, 02:22:08 PM »
Kirk,

That solved the problem! Thanks for your outstanding support!

Karl