Detect string, add to file name

A swapping-ground for Regular Expression syntax

Detect string, add to file name

Postby NipponIchi » Thu Apr 11, 2019 4:01 am

Is there is a way to detect "(Japan)" in a filename and then add "001 " or "AAA " to the beginning of the file name?

Example: "Hakunetsu Pro Yakyuu - Ganba League (Japan) (Rev 1)" to "AAA Hakunetsu Pro Yakyuu - Ganba League (Japan) (Rev 1)"

Another thought was to move the "(Japan)" to the beginning and then back.
Example: "Hakunetsu Pro Yakyuu - Ganba League (Japan) (Rev 1)" to "(Japan) Hakunetsu Pro Yakyuu - Ganba League (Rev 1)"
And then back.
So: "(Japan) Hakunetsu Pro Yakyuu - Ganba League (Rev 1)" to "Hakunetsu Pro Yakyuu - Ganba League (Japan) (Rev 1)"

Honestly I have thousands of files. Some are North American, some are Japanese, some are European, and so on. All tagged with their country in the file name. I need a way to sort through them. I was going to dump them into folders, but doing them one at a time has taken hours. If I could rename all the Japanese ones to the top of the list, then I could move them all to their own folder and easily rename them back. Then repeat the process with every country tag. Please help.
NipponIchi
 
Posts: 1
Joined: Thu Apr 11, 2019 3:32 am

Re: Detect string, add to file name

Postby therube » Fri Apr 12, 2019 9:18 pm

1.

12:Filters -> Mask -> the string you're looking for (in an acceptable format)
(Un)Check the boxes as appropriate (most likely, Subfolders)

7:Add -> Prefix -> AAA<sp>
therube
 
Posts: 507
Joined: Mon Jan 18, 2016 6:23 pm

Re: Detect string, add to file name

Postby therube » Mon Apr 15, 2019 11:48 am

For finding files, there is nothing better then Everything.

A simple search for, (Japan), will find them all in an instant.
Moving them all into a single folder would be nothing more then selecting them & dragging them where you want.

Ditto for (Europe) or (North America) or whatever you have.
therube
 
Posts: 507
Joined: Mon Jan 18, 2016 6:23 pm

Re: Detect string, add to file name

Postby Panchdara » Mon Apr 15, 2019 6:40 pm

A GBA enthusiast no doubt.
Panchdara
 
Posts: 45
Joined: Sat Jan 09, 2016 7:25 pm


Return to Regular Expressions


cron