In a lot of sites you’ll do these days, there’ll be XML driven content and clients who want control over their content. Now somewhere along the line, some silly bugger let the cat out of the bag and told a client that it is possible to write sites that read content directly from the local filestructure in order to build the site content.
“Right”, said the client, and ran off to tell all of his mates that they no longer needed to pay developers every time they needed some of their site’s content updating.

And developers everywhere wept..

Well.. only to a certain degree.. It’s all money at the end of the day, but damn if it’s not boring – and sometimes annoying – as hell to have a client on the end of the phone, hassling you on a sunny Sunday afternoon to get his files cropped and uploaded, when all you want to do is enjoy your bloody weekend and sit in your paddling pool, sipping delicately at your local offie’s finest(cheapest) brew. (pinkie raised and everything đŸ˜‰ )

Well, in flash dev, we come across things like Download lists, Photo Collections and the suchlike and to enable the client to have maximum control over their photos/documents/videos/etc, we can either write a CMS of some description or just tell them to bung their files in a certain directory on the server.

This script is designed to take a folder name (hard coded to prevent security issues) and scan through it and any subfolders, documenting any files it finds there. As I was writing this, I realised the need for restrictions on what files to show, in case the folder structure contained any files we don’t want available to public viewing – and furthermore, any folders to exclude totally from the outputted XML file.