I'm having trouble finding a solution to what I imagine is a simple task for the experts. I would like to batch rename files preserving a set number of characters in the middle of the filename. The filename I'm hoping to preserve always starts after 4 digits and a space. There is a random amount of characters after the part I'd like to preserve.
Example of filenames I would like to rename:
0001 XY12_115_049_0100 - Description of work goes here.jpg
0002 XY12_115_049_0200 - Different description of work goes here.jpg
Example of rename:
XY12_115_049_0100.jpg
XY12_115_049_0200.jpg
I'd like to preserve 17 characters as well as the file extension.
In both cases you can see we're using a "For Each" to process all the items in the selected directory, and the "If" checks that it is a file -- you could add more conditions if you wanted tighter control on what was processed. We split the file path into filename and extension, and finally concatenate the "new" name, a . and the saved extension as part of the "Move" action.
There are many other ways to do this -- I'm looking forward to what others might suggest!
This family of problems occurs frequently enough that there are dedicated apps to deal with it and should be considered if this problem occurs repeatedly in your life.
The KM solutions above are great if this is really a one-off problem, but these applications make things "easier" and "clearer" IMO:
Thank you everyone for the suggestions. The Macros Nige_S created are working for this specific task, but I'll try out the other applications if I need more flexibility with renaming. I appreciate everyone's help.
I like Name Mangler's UI better for day-to-day stuff, but I've owned a lifetime license for ABFR since the '90s and trot it out whenever I need the big gun.