Square brackets on filename

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Square brackets on filename Wed Apr 26, 2017 8:42 am • by bruce20
Hi,
I'm having trouble renaming folders/files with square brackets on them.

e.g.: I want folder "movie xyz (year) [1080p] [exam.ple]" be renamed to "movie xyz (year)".

I've tried rename with pattern name --> replace "text" with " " but it doesn't work.

Couldn't find anything on the forums except some thread from back in 2008. It didn't help me much, also kinda complicated.

Any tips?
bruce20
 
Posts: 8
Joined: Wed Apr 26, 2017 8:27 am

Re: Square brackets on filename Wed Apr 26, 2017 10:17 am • by Mr_Noodle
Look up "match patterns" in the help. You can store what you want to keep into a custom text attribute and use that in a Rename action.
Mr_Noodle
Site Admin
 
Posts: 11880
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Square brackets on filename Wed Apr 26, 2017 11:14 am • by bruce20
That doesn't really accomplish what I'd like (unless I'm doing it wrong)

Here's the case: downloaded movies have this pattern "movie name (year) [1080p] [exam.ple]"
This "[1080p] [exam.ple]" is the only repetitive text on every download. Movie name and year varies.

I don't see how match patterns can help remove or exclude this "[1080p] [exam.ple]" later when renaming since matching custom text can't work if the movie name is always different.

Or would you mind and formulate?

Thanks!
bruce20
 
Posts: 8
Joined: Wed Apr 26, 2017 8:27 am

Re: Square brackets on filename Thu Apr 27, 2017 10:36 am • by Mr_Noodle
You can use a custom text attribute to match everything up to that point. Some something like:

(• custom attribute)[(anything)][(anything)]

where custom attribute can be set to match (anything). This will result in the custom attribute grabbing everything up to the sequence of stuff inside square brackets at the end.
Mr_Noodle
Site Admin
 
Posts: 11880
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Square brackets on filename Fri Apr 28, 2017 11:18 am • by bruce20
Thanks Mr. Noodle! It worked =)
bruce20
 
Posts: 8
Joined: Wed Apr 26, 2017 8:27 am


Return to Support

cron