From: LondonLad on 6 Jul 2010 10:44 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 6 Jul 2010 11:07 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 6 Jul 2010 11:08 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 6 Jul 2010 11:47 "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 6 Jul 2010 11:55 "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.
|
Next
|
Last
Pages: 1 2 3 Prev: VBA code to go to a bookmarked drop down goes to wrong drop down Next: en/decrypting strings |