Files:scan non-recursivly

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 12.0.2): 16.0.4
Operating system and version (eg, Ubuntu 17.04): 18.04 minimal
Apache or nginx version (eg, Apache 2.4.25): nginx 1.14
PHP version (eg, 7.1): 7.3.9

Hi, is there a way to do a files:scan non recursivly? I generate a few txt-files via a bash-script and copy them to my nextcloud data folder.
After that i would love to scan those files just to have them in the webgui, but it also scans all the other subfolders which eventually contain a lot of data and files. Is there a way to scan only that folder mentioned before or just the text-files?
After a bit of fiddling around, i just couldn’t get it done, so any help on this is highly appreciated. Cheers guys :slight_smile:

The command help answers your question :wink:

> ./occ files:scan --help
Description:
  rescan filesystem

Usage:
  files:scan [options] [--] [<user_id>...]

Arguments:
  user_id                will rescan all files of the given user(s)

Options:
      --output[=OUTPUT]  Output format (plain, json or json_pretty, default is plain) [default: "plain"]
  -p, --path=PATH        limit rescan to this path, eg. --path="/alice/files/Music", the user_id is determined by the path and the user_id parameter and --all are ignored
      --all              will rescan all files of all known users
      --unscanned        only scan files which are marked as not fully scanned
      --shallow          do not scan folders recursively                                    # <<< !!!
      --home-only        only scan the home storage, ignoring any mounted external storage or share
  -h, --help             Display this help message
  -q, --quiet            Do not output any message
  -V, --version          Display this application version
      --ansi             Force ANSI output
      --no-ansi          Disable ANSI output
  -n, --no-interaction   Do not ask any interactive question
      --no-warnings      Skip global warnings, show command output only
  -v|vv|vvv, --verbose   Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug