Originally Posted by
ScottC
Try this utility:
http://www.bulkrenameutility.co.uk/Download.php
Alternatively, do a dir > rename.bat, then import the file into Excel and built your own BAT file. Each line will have to be renamed to run a command to ren(ame) the old file name into the new one. Won't take more than 10 minutes to build that batch file. When done in excel, save as plain text and run it. Be sure to run it on a copy of the files, just in case...
+1.
That's a nifty idea. I'd personally do it with Cygwin and emacs, and it would take about a minute. But using Excel is a good idea if one doesn't have a handy UNIX-like shell. In fact, I was so taken by this idea that I did it on a test case. So although the OP has clearly already figured this out, it may help somebody else.
1. "dir>file.bat" and open the bat file, as ScottC says.
2. When you import, choose "delimited" and use "space" as a delimiting character.
3. Might want to get rid of the first few rows, plus any row that says "<DIR>" in the fourth column. And the last few rows.
4. Then kill the first four columns (the file name is in the fifth).
5. Insert a new "A" column with the word "ren" in each cell.
6. Now you'll need a few helper columns. Say the filename is in cell B1 with the format m-d-yy.pdf, where "m" can be one or two digits, "d" can be one or two digits, and "yy" is two digits.
Use the following helper formulas:
For C1: ="20"&mid(B1,find(".",B1)-2,2)
For D1: =left(B1,find("-",B1)-1)
For E1: =rept(0,2-len(D1))&D1
For F1: =mid(B1,find("-",B1)+1,find(".",B1)-find("-",B1)-4)
For G1: =rept(0,2-len(F1))&F1
For H1: =C1&E1&G1&".pdf"
Now copy H1 and paste just the values into I1.
Copy down and make sure it's working the way it should. When I did it, I combined the above formulae into single cell, but that was kind of a pain to debug. This way you should see if things aren't working quite right.
7. If it works, then now delete columns C through H.
8. Save and execute!