Need Help to Create Expression

A swapping-ground for Regular Expression syntax

Need Help to Create Expression

Postby Demodave » Wed Jan 02, 2019 8:41 pm

I have around 300 files that I wish to bulk rename. Half of them say "Neon", the other half say "America". Followed by the date. The new desired format for the filenames are below. Any help would be greatly appreciated.

Original File:
Neon 1-6-2019.mp3
America 11-4-2018.mp3

Renamed File:
2019-01-06_Neon.mp3
2018-11-04_America.mp3
Demodave
 
Posts: 1
Joined: Wed Jan 02, 2019 8:34 pm

Re: Need Help to Create Expression

Postby therube » Thu Jan 03, 2019 4:20 am

See if this works:

1:RegEx
Code: Select all
Match:  (^.*) (.*)
Replace:  \2_\1


Basically... find anything up to the (final) [space], then everything that follows.
Reverse the two found items, inserting a _ between.

Same basic concept as, viewtopic.php?f=4&t=4098.
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm


Return to Regular Expressions