I have a large list with icons linking to pdf and msword files. I'd like to get the filesize in kb of the linked file then use that as the alt attribute on the image. The generated code would look something like this.
Description of file <a href="file1.pdf"><img src="pdficon.gif" alt="27.6 kb" /></a>
<a href="file1.doc"><img src="wordicon.gif" alt="33.2 kb" /></a>
All the links to the files are static href's as not all the files in the directory are used in this list. How would I go about doing in coldfusion? Would I have to get all the files using cfdirectory and then match them up with the href's? Or is there a way to just parse the parent href and grab the filesize?
Thanks!