Trigger scan from remote app?

Hi all,

What would be the best / recommended way to trigger a scan for new files from an external source?

I’m running nextcloud in a docker (LS on Unraid behind nginx) and I’m writing another app that would share access to the data folder (or one of the subfolders.)

Essentially, the app I’m writing would copy and rename a folder and some files within the shared folder, and I’m looking for a way to trigger a scan so the new folder is picked up and synched via the users desktop apps.

Any thoughts on the best way to achieve this?

Cheers!

SSH is your best option, or a frequest CRON job looking for a new file and then that triggers the scan.

Maybe it would be better that your external program uses WebDAV from Nextcloud. Than you do not need occ files:scan.

1 Like

This is the best supported solution. If this is possible, use that. if not, you are correct, you will need to do a rescan.

Thanks for the suggestions.
I’d tried the webdav approach previously, which works fine.

Just feels more clunky than I’d like, considering the apps can both access the same folder.
But it seems like that’s the best way forward.