Access a shared folder with a bash script (davfs?)

Hi,
I shared files for everyone who has the link.
Now i want to use some of this files for a bash script.

Is there any possiblity to access the files via davfs?

Thank you

I might be wrong but if you’ve shared a file with everyone and without the need to have a valid Nextcloud account, the file can be downloaded using standard https. A WebDAV share is normally only used to access files if you have a valid Nextcloud account.

1 Like

just:

curl https://domain/index.php/s/SHARE_ID/download?path=/?files=fileName.exe

if file under subfolder of shared folder then:

curl https://domain/index.php/s/SHARE_ID/download?path=/Some/Sub/Folder?files=fileName.exe

Thanks for the help.
It would be easier if i could use directorys, but it would work with downloads, too.

I want to download whole folders. I have to download them as compressed and then uncompress, or?

If you use

curl https://domain/index.php/s/SHARE_ID/download

you will download compressed directory, but you can always download file by file :slight_smile: To find files you can use curl -X PROPFIND to the /public.php/webdav/. It was mentioned here Uploading a file to File Drop using http post method, but I do not know how it works, I only can see that request is done via Browser, when I trying to do this via curl - not succeed.

I use the directory to store configuration files of programs for a Ubuntu 20.04 installation.
It would be great if i didn’t have to install a new programm for this.

I didn’t find the right url to download a whole directory with wget.
Did the “downloadStartSecret” change?

Personally I use git for same purpose, for me it looks more feasible also with clear versioning of configs and branches if needed. I run Gitea as service near to NC and quite impressed with performance of it.

I did not check that.