View Single Post
  #4 (permalink)  
Old 10-26-2004, 06:37 PM
keithme keithme is offline
WebProWorld New Member
 

Join Date: Oct 2003
Location: Dubai
Posts: 4
keithme RepRank 0
Default

Hi,

Depends on the code within "productxxx.html".

I imagine it is of a similar format throughout though.

If you look at my last posting you will see all the program tools I have, these are precisely for this type of task (HATE doing things manually too!!).

Basic way I would do this is..

1. Put all the jpg's in one directlory.

2. Use Directory toolkit to get a text listing of them.

3. Take the html files, convert to pure TEXT.

4. Concatenate all the above into ONE file.

5. Take above one file into word (TEXT so it doesn't open as a HTML file).

6. Suitable edit/replaces to get the lines with file image names ONLY left (this is def an art not a science.. would need some trial and error to achieve and probaly use of Excel in the middle after several converts to a table in Word... could only advise if saw the html files themselves..)

7. From above end up with a list of just the Part Numbers referring to the jpg's IN THE SAME SEQUENCE/SORT ORDER as the list of jpg's in 2 above.

8. Use Textpad "Block Select Mode" to create a file which would have command line rename commands for all the files in 1 above.

9. Find a command line program which will run 8 on 2 above to rename all the files.

(10. Optional.. produce an xls or access file which would have a look-up of the old jpg to the new "part_number.jpg" files "just in case" you ever need to use this in any of your programming etc in future...

IN FACT... you could use 10 above as a look up table from the old to new file names to use in whatever you are doing rather than actually renaming all the jpg's if you wanted to.. just a thought..

The art in the above would be in lines 6 and 9, all the rest is "easy" (I seem to do this type of stuff all the time, don't know why).

Send me some samples of your files and perhaps I could have a quick look and see how feasible the above sequence actually is... the format of the html files and where the Part Numbers are buried will be the key...

Hope that helps

:-)
Reply With Quote