Syncing single file by path


So first, I just want to say that Im really liking the tool.

So I have a directory which I usually sync with google drive via rclone. However sometimes I would like to sync a single file without knowing where it is positioned on google drive.

Let's just say that localDir is the root of my project and is located at C:/localDirn and remote: is the root of my project on google drive.

Currently I am using
rclone sync localDir remote: --include filename.txt

Which does the job, well sort of. Problem is that all files with said name will be synced.

What I would like to do, if possible, is to provide the full path to file so that only that file is synced.

So something like
rclone sync localDir remote: --include C:/localDir/path/to/filename.txt


Rclone version V1.51.0
Windows 10, 64 bit
Google Drive

You can certainly do that.

rclone sync localDir remote: --include /path/to/filename.txt

You'd anchor though at the start of your remote.

1 Like

@calisro thanks that is it.

Anchoring was the solution. Also I was passing path with \ and not /

Thats a windows vs linux thing. Thanks for correcting it.

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