|
|
#1 |
|
Guest
Posts: n/a
|
I have a folder containing about 5000 files with names like:
Invoice 10.1 (2012) (Digital) (4-Attachments).pdf Carbon_Copy_-_Invoice_No_02_(2010)_(2 Copies)_(Filed).pdf 01.Reciept #04 (Scanned-Copy).doc I want to rename these files by removing everything from the first bracket onwards, so they look like this: Invoice 10.1.pdf Carbon Copy - Invoice No 02.pdf 01.Reciept #04.doc Automator has replaced the _ for me, but I can't seem to get any further. |
|
|
|
#2 |
|
MVP
Join Date: May 2004
Posts: 2,013
|
I'm not sure that Automator can do this without jumping out to AppleScript, and I'll let someone else tackle that.
There are also several alternatives. Command Line Renamer Name Mangler |
|
|
|
|
|
#3 |
|
MVP
Join Date: Jan 2007
Posts: 1,766
|
If by "bracket" you mean "(", Red Menace, a frequent contributor to the Apple forums, has an Automator action for you: Change Name of Finder Items, http://homepage.mac.com/red_menace/S...automator.html. Below you'll see the settings that worked on your three-file sample.
|
|
|
|
|
|
#4 |
|
MVP
Join Date: May 2004
Posts: 2,013
|
That's nifty, I didn't realize Automator was that intelligent. Does it support full regex renaming?
|
|
|
|
|
|
#5 |
|
All Star
Join Date: Mar 2006
Location: Littleton, Colorado, USA
Posts: 506
|
"Automator" and "intelligent" aren't terms that are normally seen together. Automator started out as a good idea, but Apple really hasn't put much effort into it, so getting workflows to work in some cases can be aggravating.
There are a few actions out there that use regular expressions (for example from BBEdit), it just depends on the purpose of the action. My Change Name of Finder Items action is basically a wrapper around an AppleScript, something that Automator is good at. It is still a bit quirky in that the Automator text fields strip off any leading and trailing whitespace, but it was written to strip characters from a file name by character(s) or index.
__________________
MacBook Pro / OS X Mountain Lion (10.8.3) / Xcode 4.6 / [various (much) older stuff keeping dust off the shelves] |
|
|
|
|
|
#6 |
|
Registered User
Join Date: Nov 2012
Posts: 1
|
Is the Automator action for: Change Name of Finder Items still available for download from anywhere?
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|