Filtering files and directories

I want to filter directories and files by what they start with.

var result =  DirectoryList(arguments.path, false, "query",
arguments.filter & "*|" & arguments.filter & "*.*");


I am thinking this covers all scenarios because file sometimes don't have extensions and directories sometimes do. I don't think it can be simplier

• Please remember to add the cfml tag to your questions. You seem to forget it almost every time. – Jamal Mar 3 at 2:47
• You could probably remove the second filter, since arguments.filter & "*.*" is already covered by arguments.filter & "*" – Ageax Apr 18 at 8:38