Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Files search rutine in VC++

Status
Not open for further replies.

hrib

Technical User
Oct 28, 2003
2
US
Hi,

..In my programm I need to search for files in whole drive including subfolders. Is there any routine in VC++ which can manage that? Is "searchenv" routine capable to do that? How to specify that I need search whole drive?

Thanks.
 
you should enter each directory and list it recursively by using SetCurrentDirectory, FindFirstFile/FindNextFile.
You should know what ".." means the parent directory, "." means current directory and "\\" or "/" means the root directory. Also a recomendation is to not recurse more than two levels of directories. One level is enough. Other levels you will recurse only when you need some other directory. You will enter it and process it recursively again.

Ion Filipski
1c.bmp

ICQ: 95034075
AIM: IonFilipski
filipski@excite.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top