Read Text File to Rename Images - Please help!
Read Text File to Rename Images - Please help!
- Subject: Read Text File to Rename Images - Please help!
- From: "Ray Barber" <email@hidden>
- Date: Wed, 05 Sep 2001 17:39:02 -0500
Hello All ...
I have just learned tonight I will have to rename *all* of the original web
files on our server, from our current part number (SKU) to another number
(EBU #) for our new e-commerce system. Of this, there are close to 3,269
give or take a few jpgs. Some will have to be re-shot.
What I need help with is a script that can read a flat text file, with two
numbers (comma delimited most likely), and change the actual name of a JPG
file from our old part number to the new EBU number.
Sooo ... In the flat text file, it would have something like this -
10-10203, 123455
xx-xxxxx, xxxxxx
xxx-xx-xxx, xxxxxx
... and so on ...
These numbers are not random, they are associated to the list that is run
from a HP server. The first number you see is our old number, with the
second our new EBU number.
As an example, the original jpgs look like this; '10-10203.jpg' and would
need to change to 'p12345a.jpg', etc. Also, I need to duplicate the newly
named file, and give it to 'p12345s.jpg'. The starting p, a and s are
important, as they represent part of the EBU # - plus represent a large
image and a thumbnail image.
We go 'live' on the 15th of October, but I have to finish my work two weeks
prior to the 15th.
Ideas?? I rarely post on the list but my time just got squished to nill -
thanks so much to anyone who can get my butt out of a jam.
Ray
--------------------------------------------------------------
http://macscripter.net - News, SOTW, ScriptBuilders, Links, etc ...
http://bbs.applescript.net - BBS
http://osaxen.com - Scripting Additions DataBase
hotline://hotline.macscripter.net - hotline.macscripter.net
--------------------------------------------------------------