Trying to set up auto tagging and file retention

Nextcloud version : 25.0.4
Operating system and version : Oracle Linux 8
Apache or nginx version : nginx 1.23.1
Postgresql version : 13.7
PHP version 8.0.30

Pretty much as the title says, I’m trying to set up auto tagging and file retention on my Nextcloud server. Like many folks years of cruft has built up in my file store and I want a quick, automatic way to delete old stuff.

I have set up auto tagging to add a retention tag when a file changes (I wanted it to happen on upload but don’t get the option to do that).

File retention is set to delete the tagged files after 365 days.

All good so far, but I have a whole load of files already on the server and I’d like to get them tagged too.

I was hoping there might be a UI or CLI trick to let me apply a tag to every file in one go?

The idea of having to manually tag all the existing content just sounds so tedious.

Any ideas folks?

What comes to mind quickly is:
you could move the files into another folder (and back) but probably all your share-links will be lost that way but they will all be tagged according your rules. :wink:

Much luck,
ernolf

2 Likes

Thanks Ernolf,

I think my problem with that idea is that it would reset the change dates for the files?

Interesting idea though, I might test it with a couple of old files.

1 Like