Can I do this?

Post any Bulk Rename Utility support requirements here. Open to all registered users.

Can I do this?

Postby RandmTask » Fri Jan 13, 2006 12:09 am

Just a quick question ... if I have a file 'Title - Artist.mpg' can I rename it to 'Artist - Title.mpg'

cheers

RandmTask
RandmTask
 
Posts: 4
Joined: Thu Jan 12, 2006 11:39 pm

Postby Stefan » Fri Jan 13, 2006 11:39 am

Hi RandmTask,

> can I rename it to 'Artist - Title.mpg' ?

Yes, just use Regular Expressions and search
Code: Select all
for an group of any sign,          (.+)
followed by an blank,                \s
followed by an - sign,               -
followed by an blank,                \s
followed by an group of any sign. (.+)


(.+)\s-\s(.+)

You don't have to bother with the extansion.




Than replace with
Code: Select all
Group two           \2
an blank, - sign and another blank         -
group one           \1


\2 - \1


-----------
in complete
SEARCH: (.+)\s-\s(.+)
REPLACE: \2 - \1

-----------
but BRU recognizes space without the use of \s too,
so this regex would be enought:

SEARCH: (.+) - (.+)
REPLACE: \2 - \1

-----------
EDIT

With my current version 2.2.8.1 i have to pay attention to the extantion. ?!

Enhance the regex above with
search for an dot \.
search for any sign .+

SEARCH: (.+)\s-\s(.+)\..+
REPLACE: \2 - \1


-----------
or more correct (for if you have an dot in the file name)

SEARCH: (.+) - (.+)\.(.{2,3})
REPLACE: \2 - \1



Hmmm, hope that helps ?
Stefan
 
Posts: 736
Joined: Fri Mar 11, 2005 7:46 pm
Location: Germany, EU

Postby Admin » Fri Jan 13, 2006 4:18 pm

Many thanks Stefan.

There's an example in the help file, converting "Program Files" to "Files Program", but I think Stefan's examples are much better.


Jim
Admin
Site Admin
 
Posts: 2350
Joined: Tue Mar 08, 2005 8:39 pm

Can I do this?

Postby Yummieyummie » Sat Jan 28, 2006 3:25 pm

Now a harder one, I want to rename files which look like this:
Area-Name-lot lotnumber-version an should look like Area-lot lotnumber-Name-version
What do I have fill in where?
Yummieyummie
 
Posts: 1
Joined: Sat Jan 28, 2006 3:19 pm

Postby Admin » Sat Jan 28, 2006 9:34 pm

Hi,

Exactly the same principle. I'd probably start with:

(.+)-(.+)-(.+)\s(.+)-(.+)

\1-\3 \4-\2-\5

Basically, each () creates an item which can later be referenced using \1 \2 \3 notation. So, we're crating a group for Area, Name, Lot, LotNumber and Version. Then in the second string we're reorganising them to our needs.

Hope this helps,


Jim
Admin
Site Admin
 
Posts: 2350
Joined: Tue Mar 08, 2005 8:39 pm

Postby mikec82 » Thu Mar 01, 2007 6:03 pm

First off, this is my first post on what has already proven to be a great product for our office. I wanted to ask how I would go about changing code? Is this all done in the command prompt, and if so, it is something that a averagely computer tech savvy person could do?

What I need is to have the instead of First Name/Middle Initial (if it was used)/Last Name to be Last, First Middle Initial. Would someone mind explaining to me if this is possible? Thank you.
mikec82
 
Posts: 1
Joined: Thu Mar 01, 2007 5:41 pm

Postby Admin » Thu Mar 01, 2007 6:34 pm

Hi,

Take a look at the manual under Regular Expressions, as there's a resonable example for changing "Files Program" to "Program Files". You should be able to adapt this to your own needs.

Should if you need help....



Jim
Admin
Site Admin
 
Posts: 2350
Joined: Tue Mar 08, 2005 8:39 pm


Return to BRU Support