How to replace file with the new one (update)

Which cloud storage system are you using? (eg Google Drive)

google drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone sync --transfers 30 --checkers 8 --progress --verbose --exclude "packages/**" "/run/media/james/D/ipq806x_builds/master/bin/targets/ipq806x/generic/" "mygdrive:OpenWrt_builds/IPQ806X_master"

Hi, everything works great but I wondered, if it possible when I sync stuff to my gdrive from my local pc, to add a filter or something to delete what is in the gdrive folder? Exemple: if in my gdrive folder I have exemple20230110 and on my local directory I have the new file which is ; exemple20230111 I want that last one replace the old one, is possible?


if the files have the sames md5 hashes, might try --track-renames

if exemple20230111 is the only file in the folder, then can use rclone sync

filters are applied to the source, not the dest.

tho, odds are that you need to write a script.
how do you expect rclone to understand which arbitrary file to delete and which arbitrary file to copy
could use the time/date stamp in the name of the files

I have many files, like .txt, .config, .sh

imho, need to write a simple script.
perhaps using the date embedded in the filenames.

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