How to get the number of hard disks. Bat
This article will explain in detail how to achieve the number of hard disks. Bat, the editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
@ echo off cd. > script.txt > > script.txt echo list disk for / f% I in ('diskpart / s script.txt^ | find / c ^ "online ^") do Set HardDrivers=%%i del script.txt / Q echo the number of hard drives installed on your computer is:% HardDrivers% pause on "how to get the number of hard drives. Bat" this article ends here. I hope the above content can be helpful to you, so that you can learn more knowledge. If you think the article is good, please share it for more people to see.