PureBasic Forum
https://www.purebasic.fr/english/

Control USB drives
https://www.purebasic.fr/english/viewtopic.php?f=7&t=69869
Page 1 of 1

Author:  blueb [ Mon Jan 01, 2018 5:49 pm ]
Post subject:  Control USB drives

I have a 5-outlet (powered) USB Hub on a Win10 Pro machine.

I would like to connect 3 USB (SATA) drives, and leave them connected.

Since they are not SSD's, I would like to control when they start spinning and when they stop spinning.

As it is right now, I notice the LED's "ON" and sometimes OFF (flashing). I think Windows is doing some cleanup in background mode.

One drive backs up my computer daily, next backs up the first drive daily, and the last one is a historical backup...twice a week.

As you can see, I don't want them spinning, if they are not actually in use.

So I'd like to write a small program to ask:

- Is drive spinning?

- Is drive in use?

- If the drive is idle

- Is it safe to shut down?

Basically force a start and if idle... force a shutdown of each drive would be nice.

I have looked a little in Powershell, and VBScript, but nothing solid.

Any ideas would be appreciated.

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/