Skip to main content
Participant
May 16, 2008
Question

Search into folders and subfolders

  • May 16, 2008
  • 1 reply
  • 417 views
I must realize a procedure ColdFusione that effects the search into folders and subfolders
on the file System that simulates the Windows API, specially the function PathMatchSpecW().

How can I realize it?
This topic has been closed for replies.

1 reply

Inspiring
May 16, 2008
Take a look at the cfdirectory tag.
tac-ntsAuthor
Participant
May 19, 2008
Thanks for the information,

I must realize an optimistic search of folders and files.
For example in "C:\App\" I have 3 folders Fp_1, Fp_2, Fp_3.
Gives the run "C:\App\Fp_*" I must get the list of the 3 folders.

I use this code:

<CFDIRECTORY DIRECTORY="C:\App\Fp_*"
NAME="MyDir"
SORT="name ASC">

<CFTABLE QUERY="MyDir">
<CFCOL HEADER="NAME:" TEXT="#Name#">
<CFCOL HEADER="SIZE:" TEXT="#Size#">
</CFTABLE>

I have not a record!

Can you write a correct example code?
Inspiring
May 19, 2008
The attached sample should return the list of directories. You should also verify that the account the ColdFusion Application Server service runs as has permission to read you directory structure for C:\App.