I am using the following script to auto download files from my remote seedbox using lftp:
set ftp:list-options -a
set ftp:ssl-allow no
set mirror:use-pget-n 5
set cmd:fail-exit true
open ftp.myseedbox.com
mirror -c -P5 --Remove-source-files --log=synctorrents.log /completed /media/ExternalHd/
quit
Now, this removes files after successful transfer but leaves empty folders. Is there any method/script code to automatically remove empty folders ?