Rclone command to check if a remote directory exists

Is it possibly to check if a remote directory exists using an rclone command in an unattended shell script, prior to making a duplicate copy of it under a different name?

Perhaps you are looking for something like this

rclone lsd remote:path/to/the/folder

it will return exit code 0 if the folder exists and 3 if it doesn't.

Note: I haven't tested in detail. You may also want to check for other exit codes, to catch any errors.

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