Results 1 to 3 of 3

Thread: searching txt files for a string

  1. #1
    Guest

    Question

    how would i go about searching a txt file for a certain string of characters. I want to move all txt files with a certain string out of 1 folder into another.

  2. #2
    Guest
    Open the Text file in a hidden TextBox, then use the InStr function to find the string. If the string is found, then use the MoveFile API to move the file to it's new directory.

  3. #3
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840
    Why use a text box? why not just a string?
    Apart from limiting the size of the text you can load it would slow things down.
    Paul Dwyer
    Network Engineer
    Aussie In Tokyo

    Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)

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