Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

m021478

macrumors 6502
Original poster
Nov 23, 2007
380
5
I have backed up (ripped) nearly all of my DVD Movies over the years, and most of them follow a naming convention similar to this:

- Armageddon (1998) DVDRip XviD AC3.mp4
- American Beauty (1999) DivX MP3.m4v​

As you can see from the above examples, I initially named the files using a bunch of tech specs in the file name itself (DVDRip; DivX; MP3; etc)

I am now trying to figure out a way that I can remove all information between the close parenthesis symbol ")" and the "." symbol of the file extension? To clarify using the example files above, I'd like to rename them to:

- Armageddon (1998).mp4
- American Beauty (1999).m4v​

Does anyone know any way to accomplish something like this? Perhaps with the use of an applescript, or even a third party file renamer such as "A Better Finder Renamer"?

Any suggestions would be greatly appreciated... Thanks!
 
Many of the movies I've ripped aren't necessarily in my iTunes Library, because as the years have gone by, I've found myself ripped in different formats for different reasons.

I have lots of non-iTunes compatible .divx, .avi, .mkv, etc. movies which I won't be able to use an iTunes script to rename...

Any other suggestions?
 
Many of the movies I've ripped aren't necessarily in my iTunes Library, because as the years have gone by, I've found myself ripped in different formats for different reasons.

I have lots of non-iTunes compatible .divx, .avi, .mkv, etc. movies which I won't be able to use an iTunes script to rename...

Any other suggestions?

Like I said, Name Mangler can help, especially if you have several files ending with " DVDRip XviD AC3". You can simply replace that string with nothing, then do the next string, etc.
 
I don't suppose you would have any idea how to tell name mangler (or A Better Finder Renamer) to remove all characters between the close parenthesis symbol ")" and the "." symbol of the file extension?

I am sure this can be done using regular expressions, though I haven't got the slightest Idea how to go about doing it!

This overview of 'Regular Expressions' was about as far as I got Google-ing for a solution before I realized I was in over my head...

Anyone have any idea how to use regular expressions to specify a 'wildcard' of sorts that would instruct one of these apps to rename a file by deleting all characters between the close parenthesis symbol ")" and the "." symbol of the file extension?
 
I don't suppose you would have any idea how to tell name mangler (or A Better Finder Renamer) to remove all characters between the close parenthesis symbol ")" and the "." symbol of the file extension?

I am sure this can be done using regular expressions, though I haven't got the slightest Idea how to go about doing it!

This overview of 'Regular Expressions' was about as far as I got Google-ing for a solution before I realized I was in over my head...

Anyone have any idea how to use regular expressions to specify a 'wildcard' of sorts that would instruct one of these apps to rename a file by deleting all characters between the close parenthesis symbol ")" and the "." symbol of the file extension?

I don't know of any app that can do that, using two characters as boundaries for deleting everything in between.

However, with Name Mangler (I can't speak for other apps, since this is the only one I use for this), you can use several operations, such as replacing every occurrence of "DVDRip" with "", then every "XviD", then every "DivX", etc. and finally, replace every " " (double space) with " " (single space).

Name Mangler also enables you to remove any number of characters from the front or back, beginning with any character you choose. It's really quite robust in its capabilities.
 
For the regex replace, set the find to ").*$" w/o quotes. Make sure preserve extension is selected. Then for the replace field, use ")"

The preview of the new file name should ensure that it's doing the proper replace.
 
For the regex replace, set the find to ").*$" w/o quotes. Make sure preserve extension is selected. Then for the replace field, use ")"

The preview of the new file name should ensure that it's doing the proper replace.

Thanks so much for the tip. However I am currently using "A Better Finder Renamer" (very similar to Name Mangler), which also has regex capabilities, but the regex snippet you provided doesn't seem to work properly - at least, as I've attempted with applying it with ABFR.

Any suggestions?

img_20100521_074421.png


For the regex replace, set the find to ").*$" w/o quotes. Make sure preserve extension is selected. Then for the replace field, use ")"

The preview of the new file name should ensure that it's doing the proper replace.

I also tried your suggestion using Name Mangler and it doesn't work??

Any ideas?
 
I also tried your suggestion using Name Mangler and it doesn't work??

Any ideas?

It's possible the ) needs to be escaped. Add a \ in front of it. And what do you mean by "doesn't work," e.g., does no replacement, wrong replacement, etc.?
 
It's possible the ) needs to be escaped. Add a \ in front of it. And what do you mean by "doesn't work," e.g., does no replacement, wrong replacement, etc.?

That did the trick! Simply adding a "\" in front of the string that was previously provided made it work!

Here's the before:
img_20100522_082507.png


...and after:
img_20100522_082459.png


Thanks so much for everyone's help in getting this figured out! This will certainly be a huge time saver!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.