How to delete search results in multiple folders (.DS_Store and Thumbs.db)?

Nextcloud version: 24.0.3
Operating system and version: within docker container
nginx version : 1.20.2
PHP version: 7.4.26

The issue:

I am using nextcloud on multiple clients with Windows and mac OS. Before adding the OS specific .DS_Store and Thumbs.db files to the respective client’s ignore list, many of those files were uploaded to the server.

I would like to delete all those files (in multiple folders) from the sever. However, if I use the search, all files found files are being displayed in the search’s popup window. The main window, however, displays “No results in this folder” and also “No results in other folders” even though there are files found in the search.

The questions:

Is there a feature I am overlooking that allows me to delete all search results from multiple folders in order to get rid of those files on the server side?

Why does my search not show the results from other folders?

1 Like

Hi @maximweb
I have the same issue.
Did you figure it a way to bulk remove those pesky files from within Nextcloud?

As a possible solution for the problem:
ENSURE YOU HAVE A BACKUP OF YOUR DATA (just in case of Murphy’s Law)

  • you can open a terminal in the container (docker exec. -it -u www-data NEXTCLOUD_DOCKER_NAME bash)
  • run (find . -name /var/www/html FILE_NAME -type f)
  • Check the result and if you are happy add the delete flag and run it again (find . -name /var/www/html FILE_NAME -type f -delete);
  • then run a “php occ files:scan --all” to clear db references to the deleted files.