how to use regex to rename my files

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

how to use regex to rename my files

Postby danmcg » Wed May 15, 2019 2:48 pm

so i have the following file that i need renamed, but don't know how to use the program (the rename button is greyed out). how do i put in a req ex code and how do i get the rename button to not be greyed out

here is a sample of the file name
Check Request 010918-01 ChrisLapiMoving.xlsm
and it needs to be renamed to
Check Request 180109-01 ChrisLapiMoving.xlsm

any help would be appreciated
danmcg
 
Posts: 3
Joined: Wed May 15, 2019 2:44 pm

Re: how to use regex to rename my files

Postby therube » Wed May 15, 2019 7:56 pm

1:RegEx
Code: Select all
Match:  (.*?)(\d\d)(\d\d)(\d\d)(-\d\d.*)
Replace:  \1\4\3\2\5



(While that looks to work, there seems to be a difference - in other applications [like Everything], between:

Code: Select all
(.*? )(\d\d)(\d\d)(\d\d)(-\d\d.*)
(.*?) (\d\d)(\d\d)(\d\d)(-\d\d.*)
(.*?)(\d\d)(\d\d)(\d\d)(-\d\d.*)
and
(.*?)(\d\d)(\d\d)(\d\d)(-\d\d.*)

and I'm not sure why?
In Everything, the latter finds your filenames, but the former (two that are different) do not?
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: how to use regex to rename my files

Postby danmcg » Thu May 16, 2019 12:31 pm

thanks for the reply but in my "new name" listbox, it's naming it as YYDDMM and i wanted it YYMMDD. can you repost?

old name "Check Request 032417-01 Classic Brass Works"

new name "Check Request 170324-01 Classic Brass Works"

thanks for the help
danmcg
 
Posts: 3
Joined: Wed May 15, 2019 2:44 pm

Re: how to use regex to rename my files

Postby danmcg » Thu May 16, 2019 12:38 pm

nevermind, i figured it out.

did replace with "\1\4\2\3\5"
danmcg
 
Posts: 3
Joined: Wed May 15, 2019 2:44 pm


Return to BRU Support