Page 1 of 1

New user needs help with chaos into order

PostPosted: Fri Feb 16, 2018 7:42 pm
by jgregorym
Can anyone help me? What parameters would work best to help me rename the following 3 files keeping only the volume and page numbers separated by a hyphen (removing all other random letters and symbols, etc):
For example rename, these 3 files

volume-452_page-679_record number-0000NA_69479e48-0f89-418c-a868-d19f6a923105.pdf
volume-446_page-12_4e3e21e3-e05e-4ce2-b5e3-4937194aafc0.pdf
volume-476_page-511_record number-1226_95af5367-ad10-485a-bdf5-38f6ba55b632.pdf

so the resulting 3 file names look this below:

452-679.pdf
446-12.pdf
476-511.pdf

Can anyone give me some suggestions please?

Re: New user needs help with chaos into order

PostPosted: Sat Feb 17, 2018 2:10 am
by therube
1:RegEx
Code: Select all
Match:  (\w+)-(\d+)(\w+)-(\d+)
Replace:  \2-\4

Re: New user needs help with chaos into order

PostPosted: Sat Feb 17, 2018 2:16 am
by jgregorym
Thank you so much!! I'm going to try it now and I'll let you know how I do. I can't tell you how grateful I am you've helped me.

Re: New user needs help with chaos into order

PostPosted: Sat Feb 17, 2018 2:53 am
by jgregorym
Ok, it worked for all but a few that had this:

Old name: volume-11_page-510B_record number-951_1d49b250-f9c4-4c60-b7a7-665b169e37f4.pdf 11-510.pdf

For example where the letter B (11-510B) is missing.

Can you make a change to account for this?

Thank you again, I hope you don't mind.