Did you copy the Dirlist UDF to your script?