PDA

View Full Version : create XML code


lotsill
05-20-2007, 09:20 PM
Need some help in generating XML code based on file names.

I have 40 plus folders with 200 plus picutres in each folder with file names of 001.jpg
002.jpg
and so on


I'm trying to take the file names of 001.jpg and generate XML code like what is listed below.

<image path="images/001.jpg" />
<image path="images/002.jpg" />
<image path="images/003.jpg" />

Thanks

kewlceo
05-20-2007, 09:42 PM
Why not just use a directory dump of the filenames, then use search and replace to add the <image path=" and " /> code?

lotsill
05-21-2007, 03:37 AM
I don't understand your answer. I need a script that will search a directory for filenames then create a text file with the prefix of
<image path="images/
then add the file names

then add a suffix of " />