Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 22nd, 2003, 04:33 AM
Authorized User
 
Join Date: Oct 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to salman
Default Search files containing text

Hi,
A want to search files from folder or sub folders that contain specific text by using ASP or VB.
Pls send me ite regarding code

Thanks
Salman

 
Old October 22nd, 2003, 05:43 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 479
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default

hello salman
use this code
write the path and write the filename
'''''''''''''''''''
Private Sub Form_Load()
ShowFileList ("C:\")
Form1.Hide
End Sub
Function ShowFileList(folderspec)
   Dim fso, f, f1, fc, s
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set f = fso.GetFolder(folderspec)
   Set fc = f.Files
   For Each f1 In fc
   If InStr(1, LCase(f1.Name), "filename") = 1 Then
      s = s & f1.Name
      s = s & nbsp
    End If
   Next
         MsgBox (s)

End Function

surendran





Similar Threads
Thread Thread Starter Forum Replies Last Post
grep-search for text within files, within folders crmpicco Linux 2 September 1st, 2007 10:23 AM
Search all types of files containing text. salman Classic ASP Databases 9 April 6th, 2005 02:36 AM
Search Engine for Full-text Search Kala ASP.NET 1.0 and 1.1 Professional 2 August 29th, 2004 02:16 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.