CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2001
    Posts
    10

    Searching text in a file

    Hi,
    I want to search a text in all the files in a directry.Please tell me if there is any easy way to do that.
    Thanks,
    -arun



  2. #2
    Join Date
    Jul 2000
    Location
    Hawaii
    Posts
    281

    Re: Searching text in a file

    get the files in the director one at a time - the Dir$ function will do that

    then Open For Input the file and read into a string variable with the Input Function

    then use Instr Function to find your search string


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured