I'm writing a script to process a directory tree of images.Â*Â*InÂ*each
directory, I need to process each image and generate an HTML file listing
all of the images and links to the subdirectories.
Just about every source I can find on the 'net for processing subdirectories
points you at Find::Find.Â*Â*However,Â*I'mÂ*tryingÂ*toÂ*doÂ*some thingÂ*likeÂ*this:
enter directory
open INDEX, ".\index.html"
print INDEX HTMLheader
foreach file{
Â*Â*Â*Â*Â*Â*Â*Â*if(fileÂ*isÂ*anÂ*image){
Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*processÂ*file
Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*printÂ*INDEXÂ*File Info
Â*Â*Â*Â*Â*Â*Â*Â*}
Â*Â*Â*Â*Â*Â*Â*Â*elseÂ*if(fileÂ*isÂ*aÂ*directory){
Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*Â*printÂ*INDEXÂ*dire ctorylink
Â*Â*Â*Â*Â*Â*Â*Â*}
}
print INDEX HTMLfooter
close INDEX
next directory
I need to be able to deal with a full file tree - multiple subdirectories
several levels deep.
As near as I can tell, Find::Find was not designed for this.Â*Â*It'sÂ*only
capable of running a command on each file, not processing files and file
names in batches as I'm trying to do.Â*Â*AmÂ*IÂ*missingÂ*someÂ*ofÂ*Find::Finds
capabilities?Â*Â*OrÂ*doÂ*IÂ*needÂ*toÂ*rollÂ*myÂ*ow nÂ*functionsÂ*forÂ*processing
subdirectories recursively?