Photo Mechanic > Support

Rename issue: Replacing first 4 letter but keeping the rest?

(1/2) > >>

hilmartor:
Hi,

I have a file called:
LBV 219.jpg

Would like it to be:
pho 219.jpg

I would like to remove the LBV and replacing it with another text but keeping the number. I have over 400 pics I jhave to do this to so manually it would take to much time. How can I do this with PM?

Using Mac, 10.4.9.

A quick response would be great (as usual).

-Hilmar

Kirk Baker:
Hilmar,


--- Quote from: hilmartor on June 11, 2007, 03:46:53 AM ---I have a file called:
LBV 219.jpg

Would like it to be:
pho 219.jpg

I would like to remove the LBV and replacing it with another text but keeping the number. I have over 400 pics I jhave to do this to so manually it would take to much time. How can I do this with PM?
--- End quote ---

Put the following in the Rename dialog:

pho {filenamebase:-3}

That should do it.

-Kirk

mbbphoto:
Where in the manual is this broken down?

ie:    pho {filenamebase:-3 } means the text will replace the first 3 letters.

For instance: How do you remove the first 3 digits and the last 3 (before the suffix).

How do you delete the first 3 letters?

How do you have it recognize spaces?

Thanks

Marc

Kirk Baker:
Marc,


--- Quote from: mbbphoto on June 11, 2007, 10:43:55 AM ---Where in the manual is this broken down?
--- End quote ---

It isn't.  The new manual has not been written yet.


--- Quote from: mbbphoto ---ie:    pho {filenamebase:-3} means the text will replace the first 3 letters.
--- End quote ---

Well not exactly.  The {filenamebase:-3} extracts the last three characters of the filename.  So we're building a new name comprising the letters "pho " and the last three characters of the current filename.


--- Quote from: mbbphoto ---For instance: How do you remove the first 3 digits and the last 3 (before the suffix).
--- End quote ---

That's harder to do if your filenames are variable length.  But basically you do something like this:

{filenamebase:3,5}

...which would extract five characters, starting with the fourth character.  You'll need to know how long each filename is and adjust accordingly.


--- Quote from: mbbphoto ---How do you delete the first 3 letters?
--- End quote ---

It's more like how do you keep everything but the first three letters?

{filenamebase:3}

(extracts from the fourth character to the end of the string.)


--- Quote from: mbbphoto ---How do you have it recognize spaces?
--- End quote ---

I'm not sure what you're asking.  To the substring extraction feature, a space is just like any other character.  What is it that you're trying to accomplish?

-Kirk

wiesiek:
Wouldn't it be a good idea to allow an arbitrary regular expression pair to specify the rename source an target? It would of course be a kind of "advanced option" but very useful one  :)

Wiesiek

Navigation

[0] Message Index

[#] Next page

Go to full version