Ok Here are a couple of steps for you to try..

# Make a collection of all your CFM/HTM temlates on server and say keep
all these on your server at location /usr1/app/webroot/codebase. Call
this collection as 'mycodebase'

# Now write a small CF program which will search in this selection,
iterating for each document which are there in
/usr1/app/webroot/mycompanydocs

The simple search code combined with CFDirectory would look something
like this ..you need to complete the implementation, I am just providing
the logic and may be use CFLOG to log all results to a log file.. 

-------------------
<cfdirectory name=blah action=list directory=.....>

<cfloop query=blah>

<Lets say you are iterating 
        <cfset search_criteria = "#blah.name#">

        <!------<cfset search_criteria = "Comergent">-------->

        <cfsearch name="results" collection="mycodebase" type="simple"
criteria="#search_criteria#">


                        <cfif not len(search_criteria)>
                                Please enter a keyword to be searched.
                        <cfabort>
                        </cfif>

        <cfif results.recordcount>
                        <cfoutput>
                                <table width="100%" align="left"
border="1" cellpadding="5" cellspacing="5">
                                <tr>
                                <td colspan="4">
                                        Search Result: Total =
#results.RecordCount# records found for Search Criteria
<strong>"#search_criteria#"</strong>
                                </td>
                                </tr>
                                <tr><td colspan=4>Documents which have
<b>'#search_criteria#'</b> mentioned in them - </td></tr>
                                </cfoutput>


        <cfoutput query=results>

        <cfset parse_key = #results.key#>
        <cfset parse_key = reverse(parse_key)>
        <cfset parse_key = spanexcluding(parse_key, "\")>
        <cfset parse_key = reverse(parse_key)>
        <cfset parse_key = trim(parse_key)>

        <tr><td colspan=4><a
href="http://staging.pearsoned.com/ecomm-collection/#parse_key#";>#parse_
key#</a><br></td>

        </cfoutput>

        <cfelse>
                                <tr>
                                        <td colspan="4">No documents
were found for
<strong>"<cfoutput>#search_criteria#</cfoutput>"</strong></td>
                                </tr>
                                <tr>
                                        <td colspan="4">Try searching
for something else.  <br>
                                        <cfoutput>Search again - <a
href=http://#cgi.server_name#/ecomm-search/ecomm.cfm>http://#cgi.server_
name#/ecomm-search/ecomm.cfm</a></cfoutput></td>
                                </tr>
                         </cfif>
                        </table>
</cfloop>
-------------------

I hope this would help..

Thanks.

-Sandy Vohra


-----Original Message-----
From: John Eubanks [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 19, 2007 3:13 PM
To: CF-Newbie
Subject: Re: CFDirectory (Or, something similar)

Sandy,

Sounds pretty straightforward.  Could you elaborate on it some.

John
>You can leverage Inbuilt Verity Search Engine for searching the
>docs/cfm.
>
>A BirdEye view and solution would look like - To Automate, Iterate
>through all docs/pdfs ( considering they are in folder 'a')  using
>CFDirectory to search the collection you make for CFM Code which is in
>folder 'b'.
>
>Thanks.
>
>-Sandy Vohra
>
>-----Original Message-----
>From: John Eubanks [mailto:[EMAIL PROTECTED] 
>Sent: Friday, January 19, 2007 9:25 AM
>To: CF-Newbie
>Subject: CFDirectory (Or, something similar)
>
>Is there any way to query through a directory of .cfm files and get the
>link to a document (in this case, .doc) and map it out, to see what
>files are being used.  The situation:  Our company has a ton of files
on
>the web server, which are .doc, .pdf, and .ppt based.  The .doc list is
>huge in scope.  To save a lot of manual mapping (if you have ever done
>this, you know what I mean), I would like to just weed out the files
>that aren't being used, so they can be pulled down (probably around 60%
>of the current files).



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:2452
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to