I havebeen using readdir to identify files in directories for some time now. Last week routines which had worked fine before stopped giving the list of files I was expecting; the following is a routine which until recently worked fine for reading files in folders and sub-folders recurisvely. Any ideas (apart from it's just crappy Vista)?

Thanks Kevin but yours doesn't work either. And yes $folder is technically a path - maybe I should rename my variable. $folder contains a valid path and strict and warning are in use and the script does not generate any errors - just no useful data.

Thanks Kevin but yours doesn't work either. And yes $folder is technically a path - maybe I should rename my variable. $folder contains a valid path and strict and warning are in use and the script does not generate any errors - just no useful data.

If you didn't receive an error from Kevin's code, then obviously you didn't have strict or warnings enabled.