Is it possible to swap text within a file name?

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

Is it possible to swap text within a file name?

Postby jjking22 » Sun Mar 04, 2018 11:23 pm

I just have a question about using Bulk Rename Utility please. I would like to know if it is possible to swap text within a file, and apply that to all files in the folder, or with all files I have selected. Please see my example below.
>
> Current File:
> KV85 - 03 - Alan Jackson - Dixie Highway.zip
>
> I Want to change the order of Artist's Names in each file like so:
>
> KV85 - 03 - Jackson, Alan - Dixie Highway.zip
>
> The issue here that I think may make this difficult is that the artist's names are going all be different in each file.
>
> Any suggestions or solutions that you may have would be appreciated!
>
> Thank you,
>
> Jeremy
jjking22
 
Posts: 4
Joined: Sun Mar 04, 2018 11:19 pm


Re: Is it possible to swap text within a file name?

Postby jjking22 » Mon Mar 05, 2018 8:00 pm

Thanks Emerkamp,

The link for "How would I accomplish this file name adjustment" has helped the most, but still not getting the results I am after. When I this code:

Match: (.*) - (.*) - (.*)
Replace: \2 - \1 - \3

This is what I get:

Original File: KV132 - 01 - Tori Amos - Winter.zip
Edited File: Tori Amos - KV132 - 01 - Winter.zip

I just need to swap Tori and Amos so it looks like this:

KV132 - 01 - Amos, Tori - Winter.zip

Not sure how to accomplish that exactly.

Thanks in advance!
jjking22
 
Posts: 4
Joined: Sun Mar 04, 2018 11:19 pm

Re: Is it possible to swap text within a file name?

Postby Emerkamp » Mon Mar 05, 2018 10:16 pm

Hi,
Ok, for this example you need.
Code: Select all
Match:
(.*) - (.*), (.*) - (.*)
Replace:
\1 - \3, \2 - \4


You can use the program help menu for more, or ask if you still need help.
Emerkamp
 
Posts: 140
Joined: Sat Aug 23, 2014 2:35 pm

Re: Is it possible to swap text within a file name?

Postby jjking22 » Mon Mar 05, 2018 10:40 pm

Thank you again for all the assistance. I’m not sure if I’m doing something incorrectly or not, but trying that code is not making any changes at all now. I guess I don’t understand how the file is broken up into the different components and what the numbers are actually referencing to be able to make adjustments. Took a screenshot of what I did here but not sure if we can add those.

My other question regarding this is, if using the code to swap out those two words, meaning first and last name for one file; if I have other files selected that only have one name such as a band name like Journey, will it affect that differently and screw up the file name?
jjking22
 
Posts: 4
Joined: Sun Mar 04, 2018 11:19 pm

Re: Is it possible to swap text within a file name?

Postby Emerkamp » Tue Mar 06, 2018 3:39 am

Hi,

Check the space after the comma on match. Maybe you don't have one where i added one. Hard to tell without code block.

My other question regarding this is, if using the code to swap out those two words, meaning first and last name for one file; if I have other files selected that only have one name such as a band name like Journey, will it affect that differently and screw up the file name?

This will only match the pattern given using wild cards. (.*)
If you have problems and it picks stuff you don't want we'll need more examples to make the code more strict.
Numbers ref. groups (). First Group 1, 2nd Group2 ect..

Edit: I Got time to retest this. I tried cut and paste from your example and it works fine for me.
Make sure your selecting files to be renamed.
KV132 - 01 - Amos, Tori - Winter.zip
To
KV132 - 01 - Tori, Amos - Winter.zip

Emerkamp
 
Posts: 140
Joined: Sat Aug 23, 2014 2:35 pm

Re: Is it possible to swap text within a file name?

Postby jjking22 » Wed Mar 07, 2018 9:48 pm

Thank you so much for he help!! I was finally able to get it to work, and realized why I couldn’t before. Some files had the comma between their names and some didn’t so the program was seeing them both at the same time. I think I can work with what you have suggested going forward. Again I really appreciate your time and efforts.
jjking22
 
Posts: 4
Joined: Sun Mar 04, 2018 11:19 pm


Return to BRU Support