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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scan for files (file names) on a drive.. ?

Status
Not open for further replies.

kcostain

MIS
Sep 28, 2003
46
CA
Hello,

I'm working on a program and I'de like to build a fairly specific process... here are the details:

I want to do a recursive scan of a drive (say the C: drive) and place all of filenames found in a Tstring list or something of that nature. I'm not sure of the StringList would even handle such operation..

I also have concerns about resource usuage since this porcess can't really hog the computer when its running..

Any thoughts?

Thanks,
Kevin
 
First off, check out a recent thread here: thread102-683664 should be able to adapt the code samples very easily for your purpose.

Now - the other issue you raised is regarding this process not hogging the computer. This is not as easy as you might think. For example, the simple question of 'at what point is the process hogging the computer?' is difficult to determine. You're best bet would be to create a new thread object that does all the searching, but adjust the thread's priority to tpLower, or tpIdle. There's heaps of good help regarding threads in the Delphi help file.

Post back if you need more help with this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top