Author Topic: Code Replacement in the "Rename Photos" box  (Read 5486 times)

Offline pohtou

  • Newcomer
  • *
  • Posts: 7
    • View Profile
Code Replacement in the "Rename Photos" box
« on: October 11, 2007, 12:33:18 PM »
Is it possible or how do I use Code Replacement in the Rename Photo box. Some of the rosters that are give out, the print is so small that some of us old guys cant read it

Thank you
Warren
Warren Wimmer
708 774 4664

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24712
    • View Profile
    • Camera Bits, Inc.
Re: Code Replacement in the "Rename Photos" box
« Reply #1 on: October 11, 2007, 12:42:00 PM »
Warren,

Is it possible or how do I use Code Replacement in the Rename Photo box. Some of the rosters that are give out, the print is so small that some of us old guys cant read it

Code Replacement on Windows can be used in the Rename Photos dialog.  On the Mac it does not.  If you're on Windows, then Code Replacement works just the same as it does in the IPTC dialogs.  You just type your delimiter character (by default it is '\') and then your Code, followed by the delimiter character.  The Replacement will replace the Code and its delimiters.

-Kirk

Offline pohtou

  • Newcomer
  • *
  • Posts: 7
    • View Profile
Re: Code Replacement in the "Rename Photos" box
« Reply #2 on: October 11, 2007, 12:52:33 PM »
should have said, os x, intel.  Is it in the works for Mac or only windows?
Warren Wimmer
708 774 4664

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24712
    • View Profile
    • Camera Bits, Inc.
Re: Code Replacement in the "Rename Photos" box
« Reply #3 on: October 11, 2007, 02:48:59 PM »
should have said, os x, intel.  Is it in the works for Mac or only windows?

I initially had no intention of Code Replacement working anywhere else other than the IPTC dialogs, but as a side effect of how the Windows version of Code Replacement was written it happens to work in other places.

It is not currently in the works for the Mac.  That could change however.

-Kirk

Offline Tamer

  • Newcomer
  • *
  • Posts: 2
    • View Profile
Re: Code Replacement in the "Rename Photos" box
« Reply #4 on: December 17, 2007, 09:11:46 AM »
Any chance this functionality has changed for the Mac version in 4.5.3?

I would like to be able to use this to abbreviate the camera model so that "Canon 5D" can just be "5D".  Since there are several camera models in the mix, I can't just use substring extraction.

I am also looking for a way to better group files by {type}.  Some of my folders have a mix of .mov, .avi, .jpg, and .cr2 files and their various sidecar .xip, .thm, and .xmp files.  If I ingest folders on {type} I get too fragmented of a result.  All I really want to accomplish to is sift the video files (and their sidecar files) into one folder tree and have the photos (and their sidecar files) in another tree.

If code replacement still doesn't work in the Mac version, do you have any suggestions on how I can tackle this?

Thanks!
Mac OS X 10.5.1, PM 4.5.3

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24712
    • View Profile
    • Camera Bits, Inc.
Re: Code Replacement in the "Rename Photos" box
« Reply #5 on: December 17, 2007, 11:23:27 AM »
Any chance this functionality has changed for the Mac version in 4.5.3?

Yes.  I added that functionality in 4.5.3.  But it referred only to the 'real-time' Code Replacement functionality.  You always could use Code Replacement at processing time (during the rename) on both platforms.

Quote from: Tamer
I would like to be able to use this to abbreviate the camera model so that "Canon 5D" can just be "5D".  Since there are several camera models in the mix, I can't just use substring extraction.

You'll have to do something like this:

\{model}\

... in your rename string.  In your Code Replacement file you'll have to list all of your model names and their replacements like so:

Canon 5D   5D

Quote from: Tamer
I am also looking for a way to better group files by {type}.  Some of my folders have a mix of .mov, .avi, .jpg, and .cr2 files and their various sidecar .xip, .thm, and .xmp files.  If I ingest folders on {type} I get too fragmented of a result.  All I really want to accomplish to is sift the video files (and their sidecar files) into one folder tree and have the photos (and their sidecar files) in another tree.

If we were to add an {isvideo} variable then that would do what you want.  I'll add it to the list for version 4.6.

-Kirk


Offline Tamer

  • Newcomer
  • *
  • Posts: 2
    • View Profile
Re: Code Replacement in the "Rename Photos" box
« Reply #6 on: December 17, 2007, 02:20:13 PM »
Thanks for the clarification on the code replacement functionality.

If we were to add an {isvideo} variable then that would do what you want.  I'll add it to the list for version 4.6.

I don't know how useful the variable would be as a boolean since some people may have the same issue but with trying to filter out audio, text, etc.  Given the {type} variable, I set up a code replacement file as:

Code: [Select]
APSD Photos
CCR2 Photos
JPEG Photos
NNEF Photos
MooV Videos
WAVI Videos


That made it easy to group "Photos" into one path and "Videos" into another. 

The issue I see with this is that the value of the {type} variable isn't very obvious to me.  Is there a benefit to using the {type} variable rather than using {filename:-3,3} to act on just the file extension?

Is the "Code" column of the code replacement file case-sensitive?

-Tamer
Mac OS X 10.5.1, PM 4.5.3

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24712
    • View Profile
    • Camera Bits, Inc.
Re: Code Replacement in the "Rename Photos" box
« Reply #7 on: December 17, 2007, 04:02:39 PM »
Tamer,

Thanks for the clarification on the code replacement functionality.

If we were to add an {isvideo} variable then that would do what you want.  I'll add it to the list for version 4.6.

I don't know how useful the variable would be as a boolean since some people may have the same issue but with trying to filter out audio, text, etc.  Given the {type} variable, I set up a code replacement file as:

Code: [Select]
APSD Photos
CCR2 Photos
JPEG Photos
NNEF Photos
MooV Videos
WAVI Videos


That made it easy to group "Photos" into one path and "Videos" into another. 

The issue I see with this is that the value of the {type} variable isn't very obvious to me.  Is there a benefit to using the {type} variable rather than using {filename:-3,3} to act on just the file extension?

Is the "Code" column of the code replacement file case-sensitive?

Yes it is case-sensitive.

-Kirk