Reputation: 1205
I have a list of folders from a directory. All of the folders in this directory contain pdf files. There are about 20 folders. Is it possible to get the names of the pdf files, in all folders, without having to go through each directory (folder)?
<cfdirectory action="list"
directory="C:\wwwroot\WebServer\testing\uploads\all_folders"
recurse="false"
name="myList">
<cfdump var=#myList#>
Upvotes: 1
Views: 511
Reputation: 15846
Try using filter="*.pdf"
attribute and type="file"
.
<cfdirectory
directory="C:\wwwroot\WebServer\testing\uploads\all_folders"
action="list"
recurse="yes"
type="file"
filter="*.pdf"
name="myList"
>
<cfdump var=#myList#>
Upvotes: 7