I have a directory, which has a lot of subdirectories with very similar content.
the directory structure looks something like this.
what i would like to do is have a script, which when i put in the directory 1
will scan the directories, and show me this
<p>category1 - type1</p>
<img src="directory1/category1/type1/files/1.jpg"><img src="directory1/category1/type1/files/2.jpg"><img src="directory1/category1/type1/files/3.jpg"><img src="directory1/category1/type1/files/4.jpg">
<p>category1 - type2</p>
<img src="directory1/category1/type2/files/1.jpg"><img src="directory1/category1/type2/files/2.jpg"><img src="directory1/category1/type2/files/3.jpg"><img src="directory1/category1/type2/files/4.jpg">
etc. I only want the directories listed which contain the files in the files directory named 1.jpg, 2.jpg, 3.jpg and 4.jpg
how would I go about doing this.
thanks for any help.