Recursive ignore for file types

hi all,

could anyone help me with a recursive ignore? i have a folder called “documents” placed in the main synced directory. i want all .txt files ignored in this “documents” folder, and all its subfolders too. what’s the pattern for this?

Can you please be more precise and explain where you exactly want to configure and ignore list.

Sure, I’ll try!

On the desktop client on Ubuntu, the default Nextcloud folder located in home/joshim/Nextcloud syncs with the cloud. In this folder, I have created another folder: home/joshim/Nextcloud/documents. I wanted .txt files to be ignored in this folder by the sync client. In the settings I selected Edit Ignored Files and added: documents/*.txt

This works if I place a .txt file in Nextcloud/documents/, the sync client ignores it. However, this doesn’t work if I place a .txt in a subfolder in Nextcloud/documents. So for example, Nextcloud/documents/letters/test.txt gets synced. I wanted to know what line I should add in the Ignored Files so that .txt files get ignored in Nextcloud/documents/ and any subfolder I might create after.


I’m personally not using that client, but I did a quick test using grep and found out,
that “documents/[a-z]*.txt” only matches one file, but “documents/.*.txt” did match all txt files in sub folders. I hope this will help you.