Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Looking for a way to delete the oldest files in a folder when the folder reaches a set size limit

Featured Replies

What the title says basically. I've done a few googles, but all the solutions seem to be for deleting files after x days.

 

This isn't really what I'm looking for. I want to set a size limit on a folder, and then when the script is run, if the size limit is exceeded, then it deletes files in the folder, starting with the oldest files first, until the folder is then within the set limit. Like a DVR.

 

Anyone got any ideas? Doesn't have to be a script, if there's an app in the community apps that does this when I'm happy to use that too.

Edited by xanderflix

I'm also looking to do this, did you find a solution? For me it could be the size of a share or a disk or a folder approaching a certain limit, the oldest files should be deleted

  • 5 weeks later...
  • Author

I did not, but if you find a solution let me know!

  • 2 months later...

@xanderflix @BobbyTables

Not a direct solution to what you guys are looking for, but It is a starting point, which might help you come up with the code your looking for. Its something I was tinkering with long time ago, but I'm sure it could be modified or at least maybe a starting point to build something.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.