P
P
palikarp2015-07-17 11:57:47
cmd/bat
palikarp, 2015-07-17 11:57:47

Is it possible to compile a BAT file that, when run, deletes all data from connected usb drives?

Good afternoon Dear, is it necessary that when you run the bat file, all data on usb media is deleted?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Saboteur, 2015-07-17
@palikarp

Can. use wmic
wmic logicaldisk get volumename, deviceid, drivetype
Select only removable devices
wmic logicaldisk where drivetype=2 get volumename, deviceid, drivetype
Next, parse letters and delete/format.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question