I just test like you and that work... empty dir deleted
I just test on a directory where last night that don't work and ... that work empty dir deleted
I just test on a directory where last night that don't work and add --fast-list after
--delete-empty-src-dir ... that work empty dir deleted
I just test on a directory where last night that don't work and add --fast-list --drive-stop-on-upload-limit after --delete-empty-src-dir ... that work empty dir deleted
I do a chmod +x on the upload script.
when I run my upload script directory aren't remove.
Files are upload on gsuite and delete on source.
The upload is in alphabetical order not as your comment indicates (oldest first)
I just look in my log ( /home/ste/rclone/upload.log) and search for 'directory' no result.
this is my upload script based on your version :
I juste remove the section with RCLONE_USER_AGENT
#!/bin/bash
# RClone Config file
RCLONE_CONFIG=/root/.config/rclone/rclone.conf
export RCLONE_CONFIG
#exit if running
if [[ "`pidof -x $(basename $0) -o %PPID`" ]]; then exit; fi
# Move older local files to the cloud
/usr/bin/rclone move /srv/mypath/ gcrypt: --log-file /home/ste/rclone/upload.log -vv --delete-empty-src-dirs --fast-list --drive-stop-on-upload-limit --exclude-from /home/ste/rclone/excludes