How to get a return code

I have written a Pyton script to upload to Google Drive a file every night. I use the command "rclone check file_name my_drive".

Everything works but I would like to get from rclone a return code in order to send a mail, should there be no machine between the files.

How can I do?

Thanks for helping,

rclone will return a non zero exit code if it detects problems. returns the exit code of the program it called. You could use that?

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.