

| Sign in: |
| Members log in here with your user name and password to access the your admin page and other special features. |
|
|
|

|
|| SportsShooter.com: Member Message Board

How to rename a portion of a file name? (OSX/PhotoMechanic/Adobe Bridge)
 
Erik Bishoff, Photographer, Student/Intern
 |
Eugene | OR | USA | Posted: 3:12 PM on 08.29.06 |
->> Does anyone know how to batch-change just a portion of a file name.
In other words how to change a collection of files from something like:
"060812_Winona013a.jpg" to "060812_Wynona013a.jpg"
"060811_Winona443.jpg" to "060811_Wynona443.jpg"
I have both Adobe Bridge (CS2) and PhotoMechanic (4.4) for Mac in OSX but they don't seem to have the solution.
Years ago I had a program for my PC that allowed me to search for text in file names and it would change all of them like a find/replace in a word program.
Find: "Winona"
Replace With: "Wynona"
As you can see I have to do more than just change the sequence in a batch-rename. There are about 300 files in a folder with different names and naming conventions but all have a portion of the name spelled wrong. I need to preserve the numbering and dates but change one word.
I've worked myself into a corner.
Any advice would be very appreciated!
Regards,
Bish |
|
 
Taylor Jones, Photographer
 |
Austin | TX | USA | Posted: 3:22 PM on 08.29.06 |
->> Hey Erik,
You can use the apple script function to change any portion of a file name to something else. Under the Finder Scripts menu you can use the "Replace Text in Item Names" action. You can choose the wrong section of the name and batch replace it with the new text. Run a test, but I think thats how I did it before.
Taylor |
|
 
Curtis Clegg, Photographer
 |
Belvidere | IL | USA | Posted: 3:34 PM on 08.29.06 |
->> Erik, I was looking for the exact same thing a few months ago... here is my post in another forum:
http://tinyurl.com/qucgn
along with some feedback from another user. Unfortunately I haven't tried any of these programs yet, so I would be curious to know what you decide (I have a PC though).
Best o' luck! |
|
 
 
Primoz Jeroncic, Photographer
 |
Kranj | SI | Slovenia | Posted: 3:51 PM on 08.29.06 |
->> Since OSX is actually Unix you can do it this way:
- In directory where you have those photos, create file rename.sh
- edit this file and add this:
-------------------------------------
#!/bin/sh
pattern=$1
shift
subs=$1
shift
for i
do
newfile=`echo $i | sed "s/$pattern/$subs/"`
if test $i != $newfile
then
mv $i $newfile
fi
done
-------------------------------------
- close this file, and open terminal window and go to directory with photos and this newly created file.
- change file mode so you can execute this file (chmod 755 rename.sh)
- run this file: ./rename.sh Winona Wynona 06*
This will change all Winona to Wynona on all files starting with 06. If you want it to change it in all files add *.jpg instead of 06*.
PS: And standard disclaimer... make backup of your files first ;) And yes I believe there has to be whole lot easier way to do this, but I just can't remember any at moment. |
|
 
Osamu Chiba, Photographer
 |
Vista | CA | USA | Posted: 3:58 PM on 08.29.06 |
->> I don't have either Adobe Bridge or PhotoMechanic, but I think you should think differently. Instead of remaing a certain part of name, do the whole thing, but you can get the results you want. I know I can achieve what you want with ViewIt, and I imagine other programs can do the same. Here is what I'd do:
Step 1: sort them by naming convention
Folder A (suffix a):
060812_Winona013a.jpg
060812_Winona014a.jpg
etc.
Folder B (no suffix):
060811_Winona443.jpg
060811_Winona444.jpg
etc.
Step 2: rename each folder's images by
(For the folder A)
prefix: 060812_Wynona
counter: start with 013, increment by 1
suffix: a
Step 3: run a batch process based on #2.
Step 4: repeat #3 for other folders by changing prefix, counter, and/or suffix.
O |
|
 
Ron Scheffler, Photographer
 |
Hamilton (Toronto area) | Ontario | Canada | Posted: 4:03 PM on 08.29.06 |
->> The easy way is what Taylor recommends.
There is an AppleScript folder in the Application folder. Open it. Open AppleScript Utility. Click the box for "Show Script Menu in the menu bar" and also "Show Libray scripts" if not already selected.
You'll now see the AppleScript symbol on your menu bar for easy access... from it you can select Finder Scripts>Replace Text in Item Names.
It works great and comes free with the OS! |
|
 
Aaron Vogel, Student/Intern, Photographer
 |
Ventura | CA | USA | Posted: 5:24 PM on 08.29.06 |
->> There's also a program (free too!) called R-Name that's does that and more. http://www.macupdate.com/info.php/id/12259
Though the AppleScript way works quite well and is built in, R-Name has a very nice user interface.
Either way you can't go wrong. |
|
 
Erik Bishoff, Photographer, Student/Intern
 |
Eugene | OR | USA | Posted: 10:40 PM on 08.29.06 |
->> Sincere thanks to everyone for your help!
Aaron, you're my hero... that is EXACTLY what I was looking for. |
|
 
Craig Mitchelldyer, Photographer, Assistant
 |
Portland | OR | USA | Posted: 11:08 PM on 08.29.06 |
| ->> Bish, PM can do that, just use the rename feature and rename it were you want it and for the numbers, click sequential and say the number you want to start at. Takes about two seconds. |
|

|| Sponsor Special Deals

NEW 12x12 & 9x12 PhotoBooks
|
Available from:
Adorama Camera
|
Price: $0.00 |
Notes:
NEW Adorama PhotoBook sizes 12x12 & 9x12 (Portrait Orientation) PERFECT for Portfolios! Present and distribute your portfolio, create albums for clients, or just enjoy showing off your own family and vacation photographs. There’s no better way to preserve and display your photographs than in a real photobook from AdoramaPix. Our PixPublisher is simple to use and best of all works from any web browser. There’s no software to download or learn to use. Drag and drop your images into a themed template of your choice, or design your own layout. Resize your images, add borders, frames, backgrounds, captions or other descriptive text. It’s your book! SPORTSSHOOTER MEMBER SPECIAL-- 25% OFF USE COUPON CODE PXBKSP12 Good through 11.15.09
|
|
-- More Info -- |
|

Return to --> Message Board Main Index
|