We have a server running MS Express SQL server, and databases are set with the simple recovery model and we are backing up three databases with a batch file script as follows:
SQlCmd -E -S SQLServerA -Q "BACKUP DATABASE [SSAdmin] TO DISK='C:\DB_Backups\SSAdmin.bak'"
SQlCmd -E -S SQLServerA -Q "BACKUP DATABASE [SST] TO DISK='C:\DB_Backups\SST.bak'"
SQlCmd -E -S SQLServerA -Q "BACKUP DATABASE [TAPlusRepository] TO DISK='C:\DB_Backups\Current\TAPlusRepository.bak'"
However we would like to keep 4 days worth of copies on disk of the databases (for all 3 DB's) and automatically remove the older backups. The intention is to set this up on a daily schedule in windows task manager. ideally appending the current date to each of the backup files names each time the script is run. Any recommendations on how this can be done?