I placed a file into my local Dropbox folder. I would like it to exist only temporarily for X numbers of days. After X numbers of days the file should be automatically deleted.

Is it possible to flag a file with an expiration date after which it is automatically deleted?

  • 2
    There's no built-ins to implement this, as far as I know. – Thomas Ward Jan 27 '16 at 16:52
  • 2
    May be put something like find /path/to/files* -mtime +<enter no. of days> -delete in a cron job – Ron Jan 27 '16 at 16:57

Assuming your local folder is synced to the remote folder this is possible. I have done it with a cron entry in Linux with:

find /path/to/synchronized/folders -type f -mtime +30 -exec rm {} \;

This will delete files older than 30 days.

  • Why not -delete instead of -exec rm {}? – LiveWireBT Jan 28 '16 at 6:36
  • either way is fine. I didn't even know about -delete. – ojblass Jan 28 '16 at 18:37
  • Dear all, how can I exclude a folder called "Keep" from being deleted? – orschiro Apr 7 '16 at 10:10

Unless DropBox itself specifically has a feature for this, you cannot do it. You will simply need to remember to delete the file after said number of days.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.