Skip to content

Instantly share code, notes, and snippets.

View numeralnathan's full-sized avatar

Nathan Reynolds numeralnathan

View GitHub Profile
@numeralnathan
numeralnathan / Delete Backups.au3
Last active April 4, 2016 07:51
An AutoIt script to delete Windows Backups when disk space falls below threshold
#include <AutoItConstants.au3>
#include <MsgBoxConstants.au3>
; This is where the backups are stored
Global Const $BACKUP_DIR = "G:\NREYNOLD-LAP"
$free = DriveSpaceFree($BACKUP_DIR)
; Don't delete backups if more than 60 GB is available (i.e. enough for another new backup directory to be created)
if $free > 60 * 1024 then