From: LondonLad on
Hi
Finding all files with named extn on a single drive I have no problems with
, but can someone give me a link to helpful code so I can find all files with
named extn on all drives on my computer.

From: Dave O. on
Easy enough with some help from the API.
First you need GetLogicalDriveStrings which will return a list of all drives
on the PC, you split this in whatever way you like.
The use GetDriveType on each returned letter to check that it's a volume on
a local hard drive.

Dave O.

"LondonLad" <LondonLad(a)discussions.microsoft.com> wrote in message
news:13D98E6E-86C8-4F2C-BD3E-73570ACA1506(a)microsoft.com...
> Hi
> Finding all files with named extn on a single drive I have no problems
> with
> , but can someone give me a link to helpful code so I can find all files
> with
> named extn on all drives on my computer.
>


From: Jim Mack on
LondonLad wrote:
> Hi
> Finding all files with named extn on a single drive I have no
> problems with , but can someone give me a link to helpful code so I
> can find all files with named extn on all drives on my computer.

There's no shortcut. You add one step: find all the drives on your
computer. Then in a loop, do whatever you're already doing to find the
files on one drive, to each drive you found.

--
Jim Mack
Twisted tees at http://www.cafepress.com/2050inc
"We sew confusion"

From: Bob Butler on

"Dave O." <nobody(a)nowhere.com> wrote in message
news:evkWYzRHLHA.5684(a)TK2MSFTNGP02.phx.gbl...
> Easy enough with some help from the API.
> First you need GetLogicalDriveStrings which will return a list of all
> drives on the PC, you split this in whatever way you like.
> The use GetDriveType on each returned letter to check that it's a volume
> on a local hard drive.

I've always just looped A-Z and used GetDriveType to skip ones that don't
exist. I've never found a good reason to use GetLogicalDriveStrings. Apart
from maybe saving a few milliseconds is there anything else it provides?

From: Dave O. on

"Bob Butler" <bob_butler(a)cox.invalid> wrote in message
news:i0vjai$k1a$1(a)news.eternal-september.org...
>
> "Dave O." <nobody(a)nowhere.com> wrote in message
> news:evkWYzRHLHA.5684(a)TK2MSFTNGP02.phx.gbl...
>> Easy enough with some help from the API.
>> First you need GetLogicalDriveStrings which will return a list of all
>> drives on the PC, you split this in whatever way you like.
>> The use GetDriveType on each returned letter to check that it's a volume
>> on a local hard drive.
>
> I've always just looped A-Z and used GetDriveType to skip ones that don't
> exist. I've never found a good reason to use GetLogicalDriveStrings.
> Apart from maybe saving a few milliseconds is there anything else it
> provides?

Off the top of my head I'd say there is not a lot in it, it just seems
neater (to me) just to check drive letters that exist.

Regards
Dave O.