I have files where I need to pull out certain bits of information from the _ delimited filenames.
For example here are a few files I have that are named as follows:
BHE1Brd_GROCERY_1_09-20-2020_0_News-C_B_F_001_4_BHEXX_08132020113452.pdf
BHE1Tab_SPECIALTAB_1_09-20-2020_0_Features-C_B_A_001_4_BHEXX_08132020133258.pdf
SNL1Brd_SUNCLASS_1_04-19-2020_0_Production-B_B_G_003_4_SNLXX_04172020155143.pdf
BHE1Tab_TVBOOK_1_09-20-2020_0_Features-C_B_T_004_4_BHEXX_08132020133258.pdf
Based on the first filename listed above in the listed examples, I need to extract the following fields from the filename and make into a new filename for each file:
1. Pull out the date in the filename (e.g. 09-20-2020 and 04-19-2020) in the examples above and make the date appear as MMDDYY as the first part of the new filename.
2. Next, pull out the first 3 characters in the filenames above and tack that onto the end of the new filename currently containing MMDDYY date from step 1 above. (e.g. 092020BHE)
3. Next "hard code" DLY1ST onto the end of the filename and tack that onto the new filename we are building (e.g. 092020BHEDLY1ST)
4. Next, extract the "F" that is in bold and tack that onto the end of the new filename we are building (e.g. 092020BHEDLY1STF)
5 Lastly, grab the "001" that is in bold, strip off the first digit of the 3 digits and append that to the end of the filename we are building (e.g. 092020BHEDLY1STF01 )
So, based on the first filename example above, we would rename that file 092020BHEDLY1STF01.pdf
Any help you could provide would be greatly appreciated! I will be doing this from the command line version of the Bulk Rename utility. Thank you!