PDA

View Full Version : Search a file from harddisk



pscj
01-18-2005, 09:38 PM
Compared with other install tools,Setup Factory 7.0 is powerful in my opinion.
A problem confused me,I want search a file from target harddisk.
I only find the function "File.Find",but it search file in a partition,not in all harddisk.

Brett
01-19-2005, 08:26 AM
This code will find all fixed drives and search them:



tblDrives = Drive.Enumerate();
if(tblDrives)then
for i, strDrive in tblDrives do
nType = Drive.GetType(strDrive);
if(nType == DRIVE_FIXED)then
tblResults = File.Find(strDrive,"*.*",true);
end
end
end

pscj
01-20-2005, 12:03 AM
thx! It just what I want

Corey
01-20-2005, 12:08 AM
Joe Cool strikes again.

Intrigued
01-20-2005, 12:56 PM
I put this straight away into my copy of Code Keeper! *sinister hobgoblin laugh*