Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default Rename a group of files using an Excel spreadsheet

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 320
Default Rename a group of files using an Excel spreadsheet

Look at the VBA Name function:
Name "oldname.xls" as "newname.xls"

"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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default Rename a group of files using an Excel spreadsheet

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.

  #4   Report Post  
Posted to microsoft.public.excel.programming
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.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to rename Excel files in a folder [email protected] Excel Programming 3 January 19th 07 09:59 PM
Rename Excel Files timwell Excel Programming 2 September 30th 06 12:47 PM
Rename Files according to Excel nima Excel Programming 1 February 7th 06 01:59 AM
Rename rows/ in an Excel Spreadsheet ramacano Excel Discussion (Misc queries) 2 March 3rd 05 03:56 PM
Need Macro to rename excel files electrica7926 Excel Programming 12 February 17th 04 01:21 PM


All times are GMT +1. The time now is 03:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"