|
-
Feb 2nd, 2001, 07:03 PM
#1
Thread Starter
Addicted Member
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!
-
Feb 2nd, 2001, 07:08 PM
#2
Fanatic Member
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}
-
Feb 2nd, 2001, 07:22 PM
#3
Hyperactive Member
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-
-
Feb 3rd, 2001, 09:51 AM
#4
Thread Starter
Addicted Member
okay...
Thanks for the help. Jareware, could youplease give me coding example of finding something, and putting the resulats in a list or something?
-
Feb 3rd, 2001, 06:01 PM
#5
Hyperactive Member
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.
-
Feb 3rd, 2001, 06:20 PM
#6
Hyperactive Member
Just to get me subscribed to this thread again...
(I kinda clicked the wrong hyperlink and unsubscribed from this thread)
-JR-
-
Feb 4th, 2001, 01:18 PM
#7
Thread Starter
Addicted Member
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?
-
Feb 4th, 2001, 04:57 PM
#8
Hyperactive Member
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-
-
Feb 4th, 2001, 06:23 PM
#9
Hyperactive Member
-
Feb 5th, 2001, 06:13 PM
#10
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|