Keep a hard drive from going to sleep.
This uses the brute-force method of periodically reading random sectors.
To change the drive letter and timing, manually edit the source code.
Edit no-sleep-hd.py and customize the two variables:
EXT_DRIVE_NAME = "B"
PERIOD_SECS = 90Tested 2025-03-17 with Python 3.7.4 on Windows 11:
- You may have to install Python.
- The necessary program Pip should already be installed alongside Python.
double-clickthe filecreate-py2exe.bat
A new dist directory was created from the setup. All the files within are necessary. You can rename this directory and move it elsewhere if you wish.
- Go to the new
distdirectory. double-clickthe fileno-sleep-hd.bat.
- Exit the program with
control-cor close its window. - Then delete the files or directory.
If you just want to restore the files back to the pre-compilation state, you can run the cleanup.bat file in the dist directory.