Cfloop through files in a directory

Can someone please post some coldfusion code that will loop through a directory and make a list of all the filenames in that directory?

cfQuickDocs is your friend:
http://www.cfquickdocs.com/?getDoc=cfdirectory

I’m all for teaching a man to fish too… but sometimes ya gotta just give them the fish itself.


<cfdirectory action="list" directory="#ExpandPath('/')#" name="listRoot">

<cfoutput>
<cfloop query="listRoot">
#name#<br />
</cfloop>
</cfoutput>