If you means
then yes, it works for all external shares independent of type (ftp, smb, local, etc.).
You can upload this script to anywhere and added it to the cron job.
The aim of this script is to reduce scanning time by focused scan of external shares only. Otherwise you can run (as cron job also) following commands:
- if you have only 1 external storage then simply run command to rescan it:
php /var/www/nextcloud/occ files:scan --path="/USERNAME/files/FTP_Mount_Point"
you can find more info about and how to in this comment:
OR
- You can simply try to rescan whole NC (with external storage also) by command:
php /var/www/nextcloud/occ files:scan --all
This is inefficient way to rescan external shares, but it simply works. More info you can find in official docu: Using the occ command — Nextcloud latest Administration Manual latest documentation