You totally lost me. I already have a csv with the filename and the newfilename. How do I get this to automatically rename the files?
Main Topics
Browse All TopicsI have a huge list of .tif files that need to be renamed based on a lookup table. Can this be done fairly easily? I am running on Window2000 or Window NT4.0.
Example
file table.fieldA table.fieldB
3142.tif 3142 AD-56
2312.tif 2312 PAD-874
87631.tif 87631 CD-1256
Would like to have file names be:
AD-56.tif
PAD-874.tif
CD-1256.tif
Anyone?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
NT and WIN@K both have a CMD or DOS window.
The old DOS REN or rename command still works.
ren file1 file2
will rename file1 to file2
so all you need to do is create a large batch file with the commands in it and run it in the correct directory.
for more info, open a DOS window and type
ren /?
I hope this helps !
I am not sure what you are using as your base application for the lookup tables. But if you are using Access or Excel then to rename the files you could use this basic routine to do that. The deal is that you need to cycle through each entry under the file and table.fieldB column and plug the file names in as you cycle.
Sub RenamFile()
Name "C:\TheFolder\OldFileName"
End Sub
bring your csv into excel as columns a-c in d1 put
="rename "&A1&" "&C1&".tif"
copy d1 down all columns. copy column d to the paste buffer, open notepad and paste it.
insert a line at the top of the file to change to the correct directory
e.g.
E:
cd files
rename 3142.tif AD-56.tif
.
.
.
save the file as something.bat (remember to tell notepad to save as all files or it will call it something.bat.txt!)
doubleclick on something.bat
voila
wellsj :
Since I think that I supplied most of the information ( perhaps not in the exact format you needed ), I was wondering if you would consider dividing up the points.
You can open up new questions with points for each expert with a subject like " For xxxnname" for help with...
, and notify the experts here of what you did and perhaps even provide the links,
or
You can put in a request to
http://www.experts-exchang
to distribute the points in any manner you think is proper. .
This is especially true when you think you have received good information from more than one person, or answered it yourself.
Also see http://www.experts-exchang
I hope this helps !
Business Accounts
Answer for Membership
by: SysExpertPosted on 2002-08-27 at 12:14:05ID: 7244812
If they are all in the same directory, or you have a list by directory, all you need to do is export the old name and new name coulumns in your spreadsheet to a text file ( CSV or other) after adding a column in from that has
Rename
as text
after you have 3 columns lookink like
rename xxxa fffdd.tif
export it as a text file or csv.
Clean it up, and rename it as a batch file.
put a CD command to the correct directory, or place it in the correct directory and run it.
I hope this helps !