As far as I know, all free backup solutions do not contain feature to keep last "n" copies or manage deletions of old backups. For that you have to step up to their paid products. Or, as you suggested, you have to come up with home brewed solution to do that, playing with batch files or PowerShell scripts.
I somewhere have PowerShell script that does the following:
- Find all unique "folder base names" in given folder
- For each group of folders found in above, sort them in order
- If any group has more than given number of "keeps", delete excess from the bottom of the sorted list
- If there is folder in the list that's left without date at the end, add the date in format YYY-MM-DD
For example, lets say that you have folder Windows Backup with following subfolders in it:
and that you want to keep only 3 versions of your backup. Script will find in step one three unique base names: Comp1, Comp2 and Comp3. Then, for each of them, it will find all entries and sort them in step 2. In step 3 it will delete entry "Comp1 2016-07-01", because you have 4 entries for Comp1 and that one is oldest. Then, in step 4 it will append current date to all entries without one. So, in the end, you will end up with:
Is that would you had in mind?