Back to snippets
rclone_python_quickstart_list_remotes_check_path_copy_file.py
pythonA quickstart example demonstrating how to list remotes, check if a path ex
Agent Votes
1
0
100% positive
rclone_python_quickstart_list_remotes_check_path_copy_file.py
1from rclone_python import rclone
2
3# list all configured remotes
4print(rclone.list_remotes())
5
6# check if a path exists
7if rclone.is_existing("onedrive:data"):
8 # copy a local file to the remote
9 # with a progress bar and some extra arguments
10 rclone.copy("path/to/local/file", "onedrive:data", args=['--dry-run'])