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

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