Results 1 to 10 of 10

Thread: Lists and File Search!

  1. #1

    Thread Starter
    Addicted Member WAcKeD's Avatar
    Join Date
    Aug 2000
    Posts
    211

    Exclamation

    Okay, first lets start off with the easy question. How do you get the items in one list on one form into another list on another form? Now, the other one is a lot more complicated. How would you, given some set directories, search for a path containing a specified filename? Uggg.....Please help me!
    Thankz,
    WAcKeD

  2. #2
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Bethel, North Carolina, USA
    Posts
    987
    Q #1:

    Code:
    Private Sub Form_Load()
     Dim iCt As Integer
    
        Load Form2
        Form2.Show
        
        For iCt = 0 To List1.ListCount - 1
        
            Form2.List1.AddItem Form1.List1.List(iCt)
            
        Next iCt
        
    End Sub
    {Insert random techno-babble here}

    {Insert quote from some long gone mofo here}

  3. #3
    Hyperactive Member Jareware's Avatar
    Join Date
    Nov 2000
    Location
    Silicon Valley, CA
    Posts
    275

    Talking Q#2:

    Actually the file control prvides an extremely easy way to do that (i like things like that).

    Just set file1.path to whatever path you want to search, the set file1.pattern to (if you were for example searching for word documents that have "mydoc" included in the filename) the following:

    *mydoc*.doc

    You can use * and ? as wildcards. That sets a pattern for filenames that only files with names fitting that pattern will be shown.

    If you need help in basic searching of the CONTENTS of a file, I can probably give u some hints, I recently created one prog like that myself...

    Hope helps...


    -JR-

  4. #4

    Thread Starter
    Addicted Member WAcKeD's Avatar
    Join Date
    Aug 2000
    Posts
    211

    okay...

    Thanks for the help. Jareware, could youplease give me coding example of finding something, and putting the resulats in a list or something?
    Thankz,
    WAcKeD

  5. #5
    Hyperactive Member Jareware's Avatar
    Join Date
    Nov 2000
    Location
    Silicon Valley, CA
    Posts
    275
    Sure, what kinda search do you want to have in your prog? Just go through filenames or find specific text inside files?


    -JR-
    Last edited by Jareware; Feb 3rd, 2001 at 06:19 PM.

  6. #6
    Hyperactive Member Jareware's Avatar
    Join Date
    Nov 2000
    Location
    Silicon Valley, CA
    Posts
    275

    Arrow Just to get me subscribed to this thread again...

    (I kinda clicked the wrong hyperlink and unsubscribed from this thread)


    -JR-

  7. #7

    Thread Starter
    Addicted Member WAcKeD's Avatar
    Join Date
    Aug 2000
    Posts
    211

    Cool File Search

    All I need the search to do is to search for a specific filename. Say the user wanted to search for "Stuff". I would like the program to look through a certain directory (and its sub directories), and find any filename with the text "Stuff" in it. Could you please give me some coding and instruction to how this can be done?
    Thankz,
    WAcKeD

  8. #8
    Hyperactive Member Jareware's Avatar
    Join Date
    Nov 2000
    Location
    Silicon Valley, CA
    Posts
    275
    I actually haven't done the subdirectory thingy, but I believe that it can be pretty easily added to your program. You know, I think there was a thread about searching for certain filenames (including searching in subfolders) just a while ago... Wait a sec, I'll try to find it for ya...

    Well, I didn't, but you can try to find it yourself...

    You could use some kind of an API call to use the windows find (I think)... As I said, the search for the filenames is fairly simple. The more complicated part will be the search all subdirectories functionality... My search prog goes through a directory (no subdirectories) and searches stuff from inside the files, so I don't have any code that I could just give you. But try to look for that thread.


    -JR-

  9. #9
    Hyperactive Member
    Join Date
    Oct 2000
    Posts
    400
    Jareware, this is the thread you were looking for.

    http://forums.vb-world.net/showthrea...&postid=198343

  10. #10
    Hyperactive Member Jareware's Avatar
    Join Date
    Nov 2000
    Location
    Silicon Valley, CA
    Posts
    275

    Talking Hmmm....

    I don't know if that is the exact one but it might have been. Anyways, that is a good thread for wacked to go through, since he is doing just about the very same thing...

    PS. Do you think I should change my avatar to a more anti-microsoft one?


    -JR-

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