Mass Renaming Image Files in a folder based on excel sheet

am using The Rename which allows all kind of forms etc to rename files..

i need now a new way to rename files in this way and was wondering if there is a solution for this:


        A                               B

1     DSC0001.jpg            table.jpg
2.    DSC0002.jpg            car77_647.jpg
3.    DSC0003.jpg            house4Sale_2004.jpg
etc.


basically i will need the tool to be able to lookup the file in Column B and rename the file in Column A
example: DSC001.jpg will be renamed to table.jpg


any advice is appreciated.
swisscommerceAsked:
Who is Participating?
 
nltechCommented:
just a one time, or infrequent, thing?  i'd just whip up a batch file....

just take your spreadsheet

original1.jpg          newname1.jpg
original2.jpg          newname2.jpg
original3.jpg          newname3.jpg

and insert a new column at the left, and add "ren" each line:

ren     original1.jpg     newname1.jpg
ren     original2.jpg     newname2.jpg
ren     original3.jpg     newname3.jpg

copy the table and paste it into notepad, make sure there's no stray lines or characters in it, save it to the folder the files are in as a .bat file, and then run it.

make sure there's visible quotes around any filenames (in the excel spreadsheet) that have spaces in them (needed to handle those types of filenames on the command line)... such as:

"new name 4.jpg"

your first run or two, you might want to backup the files to a different folder before running the batch, just in case.
0
 
ECNSSMTCommented:
there is probably a better way to do this.  But this is quick and dirty
in cell C1 type                     ="Ren " & A1 & " " &B1
copy that formula down column C for the total number of entries you have

select the cells in column C that has valid entries; per the example above just select C1:C3
COPY (CNTRL + C)

go to another sheet then select Cell A1 then

EDIT > PASTE SPECIAL >  choose Radio Button VALUES > Click on OK

This will create the command lines.

Save as a text file to the folder that you have the picture files in.  Choose File > Save As >  in the FileName textbox, type somthing like Change.bat
ensure that the file type is *.txt

Also you will need to ensure that the extension on the file you just created is .BAT when it is created.  

Then you can just doubleclick on the change.bat file you created, that'll change everything found in column A to column B

Regards,  


0
 
swisscommerceAuthor Commented:
thank you all. you both are great!  just nltech was little bit more straight forward. thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.