I have hundreds of files (and folders) with names such as this
(and will have tons more on a continuing basis, so any help is greatly appreciated!!
Example:
---------
My File v1.2.3 msgid_2586720_My File v1.[2].[3]
The filename is always variable length, any number of characters, alpha-numeric, ANY keyboard valid character. basically.
Two parts of the name that are set:
1) "msgid" which immediately follows the base filename (& is often, but not always, preceded by a single space)
2) the 7-digit number (always 7) (which has an _ [underscore character] both before & after it.
Ideally, what I want is a new filename/foldername that transforms the above to:
My File v1.2.3 _2586720
IE, retain the base filename; delete the "msgid" ; keep the 7-digit number with just the first underscore (_); and delete everything after the number.
Obviously, getting rid of the "msgid" is no problem, and any extra spaces, thanks to Bulk Rename Utility!
Again, every part of the filename is of indeterminate length (ie, not fixed) +except+ for the "msgid" and the number.
I know a bit about regular expressions, (enough to do basic ops & a few advanced ones) but this one has me really stumped.
I'm guessing regex is the best/only way to tackle this problem?
Thanks in advance for any help you can provide. I did search through this (and other) forums for any pointers, but couldn't find anything that seemed to answer my problem. If I've overlooked a posting about a similar situation, please excuse me & you only need to paste in that link here, so as not to waste anyone's time.
Thanks again for a _wonderful_ utility!!