Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Make batch/vbscript do something if removable disks exist, how to do this?

$
0
0

I already know how to check if theres removable disks connected with cmd with the following command: wmic logicaldisk where drivetype=2 get deviceid, volumename, description

but now I would like to make a batch that checks if theres any removable disks connected it executes another command or runs another batch.

So it would be something like

if drivetype=2 exists then "command"

How would this be possible? Or is it even?
Im also interested in VBScript methods if batch is not possible.

I really hope there's a way to do this. Thanks in advance to anyone who can help me.



Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>