Rclone copy and create directory in destination

What is the problem you are having with rclone?

I want to copy an entire folder (including the folder itself) into a destination (google drive).

I read in the docs that: "Note that it is always the contents of the directory that is synced, not the directory so when source:path is a directory, it's the contents of source:path that are copied, not the directory name and contents."

Is it possible to sync the folder and its contents and not just the files inside?

Run the command 'rclone version' and share the full output of the command.

rclone v1.58.0-beta.6031.bf9c68c88

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 copy -Pv foldername/ "gdrive:"

The rclone config contents with secrets removed.

[gdrive]
type = drive
client_id = [redacted]
client_secret = [redacted] 
scope = drive
root_folder_id = 1SormlDS9yQthgN6KKw9eUdkuEYQdQxIl
token = {"access_token":"ya29.A0ARrdaM_YDMkW_kPu_wE9lWTMGhdASCe557ZfYifN-_YIxyw3waydIhu_Tsgy63g63LtAzFw_Q8ev9iaC3VdErOq-COUXvXeoh-nOiDCf5EdvPZJgY3sAbUnwpI9ASC-r-oA_gnUrzVIAxCHfC51CL7nJqNhg","token_type":"Bearer","refresh_token":"1//09cXEi0S8dmJyCgYIARAAGAkSNwF-L9Irrhd1kKqXQJzdvKZuWdFSmiyGFG9VMTrkcMDsQTBw2wSLddaAUJ7-XrXVHisE1bUegCs","expiry":"2022-03-15T21:59:53.8139667+01:00"}
team_drive =

It seems that this is not supported and the workaround is this: Copy entire directory structure, not just the contents · Issue #1228 · rclone/rclone · GitHub

Please correct me if I am wrong.

If you sync a folder, it does everything inside as well.

You'd have to share a log and show us what you are seeing.

I'd use the stable and not the beta as well.

hello and welcome to the forum,

i think that you want this.
it will create a folder named foldername in gdrive, and copy the files into that.

rclone copy -Pv foldername/ gdrive:foldername

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