I am using rclone to mount the onedrive file and use --poll-interval 5s to listen the file changes.
How can I copy the file changed to somewhere afterchangeNotify.
Is any commandline arguments can pass? I am using Python subprocess to run rclone and listening the standard output for now.
Run the command 'rclone version' and share the full output of the command.
Which cloud storage system are you using? (eg Google Drive)
OneDrive
The command you were trying to run (eg rclone copy /tmp remote:tmp)
rclone mount onedrive: onedrive/ --read-only --vfs-cache-mode full --vfs-cache-max-age=720h --dir-cache-time 720h --vfs-cache-max-age=720h --poll-interval 5s -vv
Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.
[onedrive]
type = onedrive
client_id = XXX
client_secret = XXX
token = XXX
drive_id = XXX
drive_type = business
### Double check the config for sensitive info before posting publicly
If rclone notify a file created or content modified, access the new file. If the file path changed, get the old file path and new file path. If the file deleted, get the file path too.
I think the rclone polling changenotify maybe can help me, but it only print the filename to stdout, it is diffiult to determine what event fired.
Also I ran the command
rclone test changnotify onedirve: --dump headers,bodies
got the onedrive polling response json, it dosen't tell me the file event type too. (Create/Move/Modify/Delete)
I change to use Python watchdog module to detect the file change, only watchdog.observers.polling.PollingObserver working (with bad performance).
Is rclone any command can get the notify change type and moniter?
like
rclone test changenotify remote: \
--created program1 %1\
--modified program2 %1\
--moved program3 %1 %2\
--deleted program4 %1
# Only for explaining, not the real commandline.
# this commandline will polling the file change and run the program1/2/3/4 with argument file path, the placeholder %1 mean old file path, %2 mean new file path.