Prevent External HardDisk from going to sleep

Lately I am loosing my temper with my 2TB external FANTOM External USB Device (GreenDrive); It goes to sleep and makes me wait for a few secs before it wakes up.
So here is a powershell one liner that writes a file periodically, thus preventing it from sleeping.

while($true){new-item h:\tmp.txt -type file; remove-item h:\tmp.txt; sleep 30}

H: is my FANTOM Drive.
tmp.txt is the file thats being written.
sleep 30 is the seconds that the script pauses execution.

This can be further extended by using windows Task Scheduler and running this script at every user login.
If scripting is not your cup of tea, try using NoSleepHD; does the same thing but has a GUI 😉
http://nosleephd.codeplex.com/

Join the Conversation

2 Comments

Leave a comment

Your email address will not be published. Required fields are marked *

WordPress Appliance - Powered by TurnKey Linux