Solved

Script for renaming jpg

Posted on 2014-11-06
3
340 Views
Last Modified: 2014-11-06
I need to rename about 300 student pix.  Currently, they are labeled 001.jpg, 002.jpg and so on.  I need to rename them to their individual student ID with the jpg extension.

I have an excel spreadsheet that has Column B with the 001.jpg format and Column C with the matching studentID.jpg format.

Is there a way to have the actual pictures renamed automatically without having to manually copy the student ID, go to the jpg picture and do a rename? 300 manual cut and pastes are not on my list of IT "to do's" but I seem to be the one who is left dealing with it.

By the way, I need this format to get the pictures into our SIS and another program.

Any help is appreciated.
0
Comment
Question by:smantz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 24

Assisted Solution

by:Phillip Burton
Phillip Burton earned 50 total points
ID: 40426258
Either:

1.Create a BAT file (which is a text file which has the extension .bat instead of .txt) in that folder - or
2. open up a command window and go to that folder (easiest way - open Windows Explorer, Shift-click on a folder, and select "Open command window here").

Then copy text from the spreadsheet. What text? Text in the format:

ren "OldName.jpg" "NewName.jpg"

If you have the information in cell B2 and C2, then D2 would be:

="ren """ & B2 & """ """ & C2 & """"

Open in new window


and copy that downwards.

Verify that that looks good (and make a copy of the Windows Explorer folder before doing this - you cannot undo it).

Then either:

1. copy it into the BAT file, close the BAT file, and double-click on it, or
2. go into your Command Window, right-hand click, and paste.

In case you typed the list that you have in column B previously, then you can always use a cataloger such as the one in www.filecats.co.uk to generate that list (just in case you have additional photographs in other folders to rename - that might save you a little time later).
0
 
LVL 24

Accepted Solution

by:
Eirman earned 450 total points
ID: 40426285
> Export your excel file as a CSV file.
> Open Flash renamer and follow the instructions for renaming by using the instructions in a CSV file.
Extract From Help (Note: The rules are truncated in the above image)
Flash Renamer is a great little program and is well worth having.
0
 

Author Closing Comment

by:smantz
ID: 40426698
Wonderful program!  Thanks for the tip
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Make the most of your online learning experience.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Introduction to Processes

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question