Re: Format USB drive

Tech-Archive recommends: Fix windows errors by optimizing your registry




"MikeD" <nobody@xxxxxxxxxxx> wrote in message
news:eDj9GMZuHHA.1168@xxxxxxxxxxxxxxxxxxxxxxx

"RDub" <rweinerattrcrentdotcom> wrote in message
news:%230Z7v0YuHHA.3404@xxxxxxxxxxxxxxxxxxxxxxx
I have a VB6 application that needs to be able to move files on to USB
stick drives as fast and as efficiently as possible with as little user
input as possible.

One of the things that has to happen early on in the process is to make
sure there are no files on the USB stick before writing any of the new
files. I have found that fastest way to insure the disk is empty is to
simply format the drive. The last time I needed to format anything I
was
using a Commodore 64 and a 1541 floppy drive. So it's been a while.



I think you're going to have trouble finding a "decent" way to do this
without user intervention. Think of the danger if one could
programmatically
format a drive WITHOUT user intervention. I'm not even neccessarily
refering
to intentional harm (though that's definately a concern). What if there's
a
bug in your code and for whatever reason, the wrong drive is specified?
Or,
what if the user has 2 USB drives (flash drives, external hard drives,
etc.)
plugged in? Are you going to be able to identify the proper one?

IMO, this is just not a good idea at all. Go with #1 (the SHFormatDrive)
and
merely have the user click the OK button to confirm. And I can't say that
as
a user, I'd be thrilled about your app formatting the drive at all.


Ditto.

Due to delay, I didn't see your post or I wouldn't have bothered.

Even if this is an internal application where users can be treated as
cattle - sooner or later the wrong ox is going to get gored. <g>

-ralph


.


Quantcast