View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Rich Rich is offline
external usenet poster
 
Posts: 298
Default Rename a group of files using an Excel spreadsheet

Doh! I should have thought of that! So easy! Thanks much! Worked like a
charm.
-Rich

"Ivyleaf" wrote:

On Apr 5, 1:02 am, Rich wrote:
Is there a way to do automate the renaming of a large number of files from a
spreadsheet that contains the old and new data?

Thanks!

-Rich


Hi Rich,

Two ways that I can think of.

The first would involve writing code, the second though is probably
easier.

Assuming you have the old filenames in Col A and new ones in Col B:

1. Insert another col at the start, so that col A is empty.
2. Fill Col A with "ren" for as many rows as you have.
3. Go File - Save As and select the "Formatted Text (Space delimited)
(*.prn)" format.
4. Type the file name (anything will do) and hit Save.
5. Move the file to the directory that has the files in that you want
to rename (unless you had paths in the names as well in which case it
doesn't matter).
6. Change the extension on your new file to ".bat"
7. Double click it.

Cheers,
Ivan.