Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Name: AlwaysWillingToLearn
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

You need to use the Win32 API function calls:
FindFirstFile
FindNextFileYou add these to your program using the Add-In Tools API Viewer.
Hope This Helps
Chi Happens

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

![]() |
![]() |
![]() |

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