I have found two programs which were supposed to keep the hard drive awake and spinning: NoSleepHD and xSleep. I tried both and none of them worked properly with my particular external hard drive. It still was getting asleep once in a while.
So I wrote myself a little program which creates as many temporary files as you want (each a few bytes long) in specified locations and overwrites them once in a specified time interval. This way it is ensured that the drives keep spinning.
The program runs only in Windows. You can download it here:
keepawake.zip for 64-bit Windows
keepawake32.zip for 32-bit Windows
Extract the downloaded zip file. Then you should have a look at the configuration file keepawake.cfg.txt. By default it looks like this:
How often to overwrite all temporary files (in seconds):
Paths to the temporary files (one path per line):
By editing the configuration file you can set up the interval how often the program will overwrite each file in the list of temporary files. The default cycle is 40 seconds.
The last lines of the configuration file are the paths to the temporary files which will be created or overwritten once per cycle. You can add as many as you want here. One temp file per physical drive is enough. If you want to keep drives I: and J: awake, instead of C:\temp.tmp you can have there:
J:\some folder\I don't want to call this file temp.tmp
It is even possible to add network paths, e.g. \\Homecomputer\datadrive\temp.tmp
Then you just run keepawake.exe. The console window of cmd.exe will open and, in the given time interval, it will refresh a message about how long the drive has been kept alert. You'll have to keep this console window open or minimized for all the time you want to keep the program running.
This is how the console window looks on my computer:
You will find the source code of the program in the source folder. It's written in Python 3.2. It's public domain. Do with it whatever you want.