Computing.Net > Forums > Programming > VB Folder Search

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

VB Folder Search

Reply to Message Icon

Name: AlwaysWillingToLearn
Date: September 17, 2003 at 09:53:03 Pacific
OS: windows 98
CPU/Ram: 750, 256
Comment:

Hi all, im new to this site so i dnt knw how ths works hopefully this msg gets through. im trying to make a sub or function that will be able to search my entire c:\ drive for a folder that i specify within a text box. for example if i say "windows" it finds the windows folder and returns its path into another text box. also if the folder is within a sub folder it should still find it.

its a tuff one i know. pls can someone hlp me.

Thank you
have a nice day



Sponsored Link
Ads by Google

Response Number 1
Name: Chi Happens
Date: September 17, 2003 at 17:10:37 Pacific
Reply:

You need to use the Win32 API function calls:
FindFirstFile
FindNextFile

You add these to your program using the Add-In Tools API Viewer.

Hope This Helps
Chi Happens


0

Response Number 2
Name: AlwaysWillingToLearn
Date: September 18, 2003 at 04:21:30 Pacific
Reply:

Thanx chi happens for your reply, i have two questions for you regarding this, firstly will this find a file o a folder, because i want to be able to locate a folder that i specify in a textbox.

secondly i went to add-ins opened up adin manager and loaded the api viwer.

i then went to my apiload and got the functions for the findfirstfile and findnextfile

Public Declare Function FindFirstFile Lib "kernel32" Alias "FindFirstFileA" (ByVal lpFileName As String, lpFindFileData As WIN32_FIND_DATA) As Long

but to be honest i have never used functions properly before, usually i get them from people who have made simpler code. therefore i have apsolutely no idea how to use them.

when i run the program it say
'user-defined type not defined'

is there something i need to do to make this work?

i know its not fair to ask but can you write a small example for me i would appreciate that a lot.

Thankyou
Bunty


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: VB Folder Search

::~~ VB String Search ::~~ www.computing.net/answers/programming/-vb-string-search-/8273.html

Controlling a vb app, from another www.computing.net/answers/programming/controlling-a-vb-app-from-another/8084.html

VB Help! searching database www.computing.net/answers/programming/vb-help-searching-database-/6528.html