Favorite to latest month auto-upload

Dear Community,

I cannot find the right search string to help me do what I want.

I am running the latest nextcloud production version.

I currently have NC android auto-upload and delete photo and video to NC server using external folder /samsung and have subfolder for year month enabled.

I have set /samsung as favorite with the star so it apears on top. now you guess is right I would like a direct link to the latest month in my root.

I would like this to be automated.

any hints on how to accomplish this.

During my search to a solution I found this in the developers manual Basic APIs — Nextcloud latest Developer Manual latest documentation

particularly Basic APIs — Nextcloud latest Developer Manual latest documentation

this made me create 2 files fav0 and fav1

example fav0

<?xml version="1.0" ?>
 <d:propertyupdate xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
  <d:set>
   <d:prop>
     <oc:favorite>0</oc:favorite>
   </d:prop>
  </d:set>
 </d:propertyupdate>

fav1 contains a 1 where there is a 0 up in oc:favorite

I am currently still testing but this is working for me
set variables

url=https://cloud.example.com/remote.php/dav/files/user@name.com/Samsung%20Camera/
UP="user@name.com:created-app-password-for-this"

then use curl

curl ${url} -u $UP --request PROPPATCH --data “$(cat fav0)”