Can I make SFK delete all but most recen...

  • stone1343

    stone1343 - 2012-08-03

    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!!!)

  • stahlworks

    stahlworks - 2012-08-03

    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.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks