Prohibit files (by dir, name or size) to be moved into Trash and get them purged instead

Nextcloud version (eg, 20.0.5): 20.0.09
PHP version (eg, 7.4): replace me

The issue you are facing:

I save some huge Backup Files into nextcloud. If I remove them they should not get moved into Trash

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Save a File into Nextcloud
  2. on Desktop PC move them to their final destination
  3. on Nextcloud the file get moved to Trash

How could I prevent certain Files to be moved to trash? This file could be identified by Filesize, filename or Directory it is stored in.

A possible way would be to use the Workflow External Scripts-App to call an external script to delete the file, if you e.g. rename it to *.delete etc. This would prevent the system from moving it to the trash folder.

Using Flow seems an interesting Idea. I tried around, but you are right. It seems ther is a need for an external script. Do you know a good tutorial for that? Do I have to create a simple bash o PHP script?

Basic information about the app can be found in the Github repository of the app. Due to the fact that several questions around the app usage have already been answered in this forum the past, it would be a good start to check these postings first:

I personally prefer to use shell scripts but php should also be possible :wink: