Prevent Hard Disk from going to Sleep in Windows 10/8/7

In this post, we will see how you can prevent your primary, secondary or external hard disk drive or USB from going to sleep on a Windows 10/8/7 computer. You do not want your external hard disk going to sleep and yet you find that at times it goes into the Sleep mode. Sleep is a power-saving state that lets you quickly resume full-power operation when you want to start working again.

Prevent Hard Disk from going to Sleep

Prevent Hard Disk from going to sleep

To prevent the Hard Disk from going to sleep, click on the Battery / Power icon in the taskbar and select More Power options. In the Control Panel windows which opens, select Change Plan settings for your current Power Plan. In the next window, select Change advanced power settings.

In the Power Options box that opens, click the + sign next to the Hard Disk option. Here you will see the required settings under Turn off hard disk after heading. Change the value to 0.

Click on Apply > OK and exit. This setting will prevent your hard disk from entering the Sleep mode.

Prevent External Hard Drive from going to sleep

Prevent External Hard Disk from going to sleep

If you are looking for a freeware to make things easy, try these! NoSleepHD writes an empty text file every few minutes to your external hard disk drive to keep it from going into auto-sleep mode. KeepAliveHD will write an empty text file to your primary as well as secondary drives so as to prevent it from going into automatic standby mode. Mouse Jiggler will prevent Windows computer from going to sleep. Sleep Preventer will prevent your computer from switching to Sleep, Hibernate, Standby mode.

Do check out these links too:

  1. Prevent Windows computer from waking up from Sleep
  2. Sleep Mode is not working in Windows.
Download this VPN to secure all your Windows devices and browse anonymously
Posted by on , in Category Windows with Tags
Anand Khanse is the Admin of TheWindowsClub.com, a 10-year Microsoft MVP Awardee in Windows (2006-16) & a Windows Insider MVP. Please read the entire post & the comments first, create a System Restore Point before making any changes to your system & be careful about any 3rd-party offers while installing freeware.

19 Comments

  1. thanks for the info.. i will use it for my WD hard disk..

    thanks once again

  2. salamander

    Im using a wastern digital duel Drive and i set my Hard drive to 0 but it still goes into sleep mode, im i stuck or can i do somthing about this?

  3. Mark Go

    H,i i set my Hard drive to 600 and that works 🙂

  4. Soubesses

    I have the same problem as salamander, every website says to use this option, but it only applies to the OS Disk, it does not apply to secondary disk. Any help?

  5. GrizzlyAK

    Most USB connected drives that I’ve experienced, especially WDs, ignore OS power management settings, and will still spin down after a certain idle time, even high performance WD Black drives. I’ve heard people having mixed results with scripts that simply write a small or empty text file to these drives on a schedule to keep them away, since depending on cache settings, if you simply rewrite the same file over and over, the drive will not actually write to disk, but just update the cache, with the result being the drive still spins down to sleep.I’ve even written my own with little luck.

    One thing I have just done which seems to be working is to actually copy a small file from one disk to another. I have three external USB drives that I wanted to keep alive, so I created a small text file on one drive (G:), and run the following JScript script every 10 minutes (you might have to adjust the frequency) using Task Scheduler in Win7 by calling it directly (Win7 uses WSH to run the JS file automatically, assuming you haven’t re-associated .js with another app, e.g., Dreamweaver):

    =======

    function copyfile()
    {
    var fso, fh;
    fso = new ActiveXObject(“Scripting.FileSystemObject”);
    fh = fso.CopyFile(“G:\keepalive.txt”, “H:\keepalive.txt”, true);
    fh = fso.CopyFile(“H:\keepalive.txt”, “I:\keepalive.txt”, true);
    }

    copyfile();

    =======
    This seems to be working for me, I think, because the copy actually forces the OS to write a new file to a new location on disk each time, then erase the old one (at least I think that’s how it still works). Hope this works for you too.

    Cheers,
    Griz

  6. gsboris

    Hi Griz, good post, it gave me an idea how to fix my problem.

    I have laptop with SSD primary and HDD secondary, HDD goes to sleep in 30s. It is so frustrating every time I do something I have to wait a second or two, cause I keep only system on ssd the rest is on hdd. Found no way to adjust it in windows settings etc.

    However, I worked off your approach. There was a problem though, cause Scheduler wont allow <1min interval. So I wrote batch file that copies 3 times at 0, 20 and 40s:

    keepspinning.bat:
    xcopy c:tempkeepspinning.txt d: /Y /C
    timeout /t 20 /nobreak
    xcopy c:tempkeepspinning.txt d: /Y /C
    timeout /t 20 /nobreak
    xcopy c:tempkeepspinning.txt d: /Y /C

    that I run from Scheduler at 1min interval.
    BUT, batch execution brings up cmd window, so I use VSB script to run it silently:

    keepspinning.vsb:
    Set WshShell = CreateObject("WScript.Shell" )
    WshShell.Run chr(34) & "C:Tempkeepspinning.bat" & Chr(34), 0
    Set WshShell = Nothing

    I.e. now I run this vsb script, that runs batch file, from Scheduler at 1min intervals.
    And that is the only way I came up with to deal with this annoyance, and it is safer for hdd not to spin up so much.

    Hope it helps somebody.

  7. Kamal Elsayed

    Would you please, I’m not that high tech who can write programs, Could you please give me simple instructions that I can follow or do and be able to fix this problem. Thanks in advance.

  8. gsboris

    At what intervals do you want it to write to your HDD? If it is 20s just create file somename.vbs copy the script from above in there. Create keepspinning.txt in c:temp now on your PC right click on start button then search Scheduler then open it. Right click in tasks and chose Create New. Name it. Chose triggers enable check box for Repeat task every – and just type there “1 minute”. In for duration set indefinitely. In actions select New and in Program/script select your .vbs script file. Leave other settings as they are. Save it and that is it.

  9. Dader

    Thank you very much that hdd app worked perfectly

  10. Pavin Joseph

    The power options never worked for me in Windows 8 or 10. Below is small batch script you can use. Save it as a .cmd or .bat file and double click to run.


    @echo off
    :start

    REM --- Change the drive letter D below to match your HDDs. To add another drive replicate the copy and del lines ---
    copy NUL D:HDDActive.txt
    del D:HDDActive.txt

    TIMEOUT /T 30 /NOBREAK
    goto start

  11. a simple man

    hi there, i have windows 10 and do this but my hdd still go into sleep mode
    (i also set it for 100 min, but don’t work)
    any help or it’s just the disk that set this way by the constructor ?
    it’s a toshiba MQ01ABD100

    (sorry for bad English, not my native language)

  12. AspTower

    I’m using an Asus E200HA Laptop which doesn’t have many alterable settings in Power Options.

  13. jaybonaut

    No, you need to set it to 5 minutes. It needs to be a shorter length, activating it more frequently to prevent them from going to sleep. Try 5 minutes – if you set it to 100, the programs will wait 100 minutes before doing anything at all.

  14. André Campana Merétika

    There’s a simple solution for this.. Quit being a Microsoft xxxx and go back to Windows 7! Both Windows 10 and 8.1 have this problem, never had any issues with Windows 7 about this, my hard drives keep shutting off while i try to record and the recording hangs up.

  15. CBoots

    Using windows 10 and my external hard drive sleeps within a few seconds. I have it set to never slee but still having the problem. Can anyone help

  16. Waltraud Blumenthal

    typical useless answer – does not work – there is no switch in any windows to selectively keep a disk alive while other(s) sleep(s) – shameful

  17. slap

    wrong. This happens on any OS as external USB drives have their own power managment settings built into the drive firmware. Next time try not being wrong when you make stupid statements.

  18. Mr.Blix

    You should state that this only works on the drive where your OS is installed. For me its installed on a ssd. this doesn’t do anything because its a ssd. my hdd is my secondary drive and thats where my problem is. it randomly goes into standby mode and turns on when something is accessing files on it. this is very annoying because every 30 seconds it gives me a 1-2 sec delay…

Leave a Reply

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


7 + 4 =