Auto tag deleted files

Hello all,

i hope you are having wonderful day.

I’ve been searching on the forum and haven’t been able to find a possible solution to my question.

is there a way to auto-tag deleted files so i can add a retention policy to them like, delete after 30 days??

i saw that the auto tagging is only working when uploading new files, but not when deleting.

Thanks in advance!


Nextcloud version: 11.0.2

Hello, does anyone know how to accomplish this?

Sorry @Dridhas I don’t see this being possible (via auto-tagging)

Besides any tagging, you can force the removal of files from the trash bin after e.g. 30 day by setting parameters in config.php: https://docs.nextcloud.com/server/11/admin_manual/configuration_server/config_sample_php_parameters.html#deleted-items-trash-bin

Or did I misunderstand what you are looking for?

the intention of this is when users delete any given file there is an option to purge the deleted files every 30 days of the deleted day.

so, if i understand correctly just by having this Deleted Items app and having this command ‘trashbin_retention_obligation’ => ‘auto’, in the config.php would do the trick?

As ‘trashbin_retention_obligation’ => ‘auto’, is the default value, you wouldn’t need to set anything besides enabling the trash bin app of course. But it will only keep files for a minimum of 30 days and delete them afterwards only if space is needed. To force the removal of files after exactly 30 days, regardless of data space, you need to set ‘trashbin_retention_obligation’ => ‘30, 30’, which gives 30 days as minimum and maximum to keep the files in trash bin.

this helps a lot… :slight_smile:

i really appreciate your insights and help on this.