# Preventing automatic spin down, USB hard drive



## carl2007 (Nov 10, 2007)

I have a WD 'My Book' USB HD and it auto spins down (sleeps) after 10 mins. WD say this is a permanent feature so I'm now wondering how best to prevent this with software or O.S., e.g. to save a small file to the drive automatically every 9 mins.? Thanks.


----------



## drunkendo (Jan 22, 2008)

same problem here, thats really annoying as it reduces the lifespan of the disk.


----------



## carl2007 (Nov 10, 2007)

Still struggling with this one. Does anyone know of an application or maybe even a command prompt routine that will save a small file routinely every so often to prevent a drive from going to sleep?


----------



## carl2007 (Nov 10, 2007)

I would advise against purchasing a WD MyBook USB drive. The thing is driving me mad, constantly spinning up and down every 10 minutes. It always seems when you want to save a file its just spun down! Still can't find a way to prevent this, it looks as though it may not be possible!


----------



## Shagpile (Sep 14, 2008)

Okay here it is - This "feature" is built into the drives and can not be disabled. Every 10 minutes the drive will spin down. My personal opinion is this is more damaging to the drive since it stresses a lot more spinning up than saving 1 minute every now and again down.

To fix this problem you must read/write a piece of data to the drive every 9 minutes or so. You can either do this by creating a file (eg. alive.txt) on the drive and creating a batch file in windows and set it up using windows scheduler so it runs every 9 minutes:

echo a > m:\alive.txt

The other option (much nicer as you dont get the cmd.exe screen popping up all the time) is to make a program that does the same thing.
Paste the following into visual studio and compile it. I put this into the startup folder. It runs as a background process and does its work really nicely. 0% cpu usage and uses 664k ram (somehow).

#include "stdafx.h"
#include <windows.h>
#include <stdio.h>

int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
//The following sleeps for 550 seconds, opens m:\alive.txt
//and writes 'x' to the start of the file.

FILE *openfile = NULL;
while (true)
{
Sleep(550000);
openfile = fopen("m:\\alive.txt","w");
fputc('x',openfile); 
fclose(openfile);
}

return 0;
}


----------

