I posted this on my blog as some sample code for working with layers within folders. There code is about 60 lines long and contains two def's for printing messages and sending the contents of a text list to a file for those are interested.