Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Search into folders and subfolders

New Here ,
May 16, 2008 May 16, 2008
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?
TOPICS
Advanced techniques
362
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
May 16, 2008 May 16, 2008
Take a look at the cfdirectory tag.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 19, 2008 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?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
May 19, 2008 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.


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 20, 2008 May 20, 2008
LATEST
Thanks for your help,

it works very well.

Best regards

Tamara
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 19, 2008 May 19, 2008
you may want to check cf docs on proper use of CFDIRECTORY tag.
(tip: it requires a full absolute path to directory, but has TYPE and
FILTER optional attributes)

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources