Renaming jpgs in a directory using names in excel spreadsheet

  • Thread starter Thread starter Tobey
  • Start date Start date
T

Tobey

Hi,

I have spreadsheet with images named by one of our vendors. We need to
rename these images with our SKUs.

I've done a VLookup to juxtapose the vendor image names with our SKUs,
now how do I automate a rename of the actual images in the file with
our SKUs listed in excel?

Thank you!!!
Tobey
 
Hi Tobey

You can loop through the list and use the Name function
If you need help with the loop post back with details

Sub Move_Rename_One_File()
'You can change the path and file name
Name "C:\Users\Ron\SourceFolder\Test.xls" As "C:\Users\Ron\DestFolder\TestNew.xls"
End Sub

Instead of this
"C:\Users\Ron\SourceFolder\Test.xls"
You can use a cell reference in the loop to rename the file
 
Look up the Name Statement in the VB help files... it allows you to rename
files on the hard drive (as an extra hint, I always supply a full path for
both arguments when using this command).

Rick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top