New
#1
Remove last seven characters from multiple filenames?
Hello.
I have a bunch of documents in a data base, all associated with TIFF images, and all having unique DOCIDs. When I batch-print several of the TIFFs to PDFs, the stupid program, instead of just naming them by their DOCIDs, appends a seven-digit serial number to the DOCID, thus:
ABCD0000789 --> ABCD00007891234567.PDFI want to delete those last seven digits before the dot.
I know there are free utilities that make this stuff easy, but I'm at work, where I'm not allowed to install programs; so I have to use native DOS or Windows 7 functions. I'm sure it can be done quickly and easily with the REN command in a DOS window, but I don't know how to identify the last seven digits for REN and tell it to delete them.
Unfortunately, what comes before the last seven digits is variable--it's always some letters followed by some numerals, but the number of each can vary, there might be a hyphen or a space among the letters, and there might be a space between the letters and the numerals; so I can't just tell DOS to delete everything after the first n digits, which I gather would be easier. (I've found several examples of scripts for removing the first so-many digits, but I can't figure out how to adapt those to solve my problem.)
Thanks for any help.
Regards,
Jim Crutchfield
Long Island City, NY