Rename files to match names of other files (Win7)?

I went ahead and solved this using google spreadsheets.

Step 1 (getting file lists into sheets):

I just used dir /b >filelist.txt to get a list of the base files (maybe useful later).

Copy/pasted that into the first column of a spreadsheet...

Repeated the process for the images that need to be renamed dir /b >imagelist.txt

Copied that into another column in the spreadsheet... Column D

Step 2 (shortening filenames for search):

My file names had ('s in them which were messing up my matching search that I'm going to get to shortly, so I did this: =LEFT(A3, FIND("(",A3)-1) into column J to get just the string of the file up to the punctuation, the goal for this line was to get the base file name for use in a search of the image names for closest match. Base filenames were in column A.

Did the same thing on the image names just in case to cut down search criteria, into another column (M).

Step 3 (Matching shortened names):

Then I used =INDEX(D:D,MATCH(J3,M:M,1),0) to search my shortened file names from the list of my shortened image names. Column D contained the full image filenames, Column J the SHORTENED file names, column M the SHORTENED image names.

This produced a column of Matched image filenames (Column G) to base file names that was about 98% accurate, which is good enough for me to finish manually in about 5 minutes... so finally, I output my rename command:

Step 4 (output the renaming command):

="ren " & CHAR(34) & G3 & CHAR(34) & " " & CHAR(34) & LEFT(A3, FIND(".",A3)-1) & RIGHT(G3,4) & CHAR(34)

Column G contained my matched image to file, and column A contained the complete original file names... so this takes care of the extension and spits out something like: ren "OH50us01.tif" "OH_50_US_UTM.tif" assuming a base filename of OH_50_US_UTM.shp

Step 5 (bat file time):

Copied my formulas down, pasted the ren commands into a bat file, cleaned it up, ran it, and boom, job done.

I realize this is a lot of steps but I wanted to outline it here in case anyone else wants a way to do this without having to resort to scripting. It should serve as a base guide for manicuring two lists of files down to simple strings, matching those strings between one another, and then getting the list of original file names matched to target file names.

I will use this method until I have time or need to write a more complete renaming/matching utility.

/r/techsupport Thread