Hi I have a folder where I store backup files, can I use SFK to delete the older files from this directory, keeping, for example, the 7 most recent?
This gives me the list of files in the folder,
sfk list -old Backups
I want to keep the first 7 and delete all the rest. Seems it should be possible, any suggestions?
(And thanks to StahlWorks for a great tool!!!)
sfk list -before 30d Backups
lists all files older than 30 days within Backups. So you may add +del to delete them, or use
sfk delete -before 30d Backups
in one step. However to delete all files except the most recent n files isn't possible directly or it may require a complex workaround.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.