After listing them, how do I actually add them to my drive

Continuing the discussion from Copy from a google drive folder not in My Drive?:

Hi, thanks for this wonderful tool.

Here, clone lsf --drive-root-folder-id 1oCMgJeBc55NuEasPcgwjx2FuPdQd8neu drive: gives the list of all files/folders available on that public folder, now how do I add them to my drive? (i.e, the above command only lists them but doesn't actually add them to my drive.)

hello and welcome to the forum,

  1. save the output to a file
    rclone lsf --drive-root-folder-id 1oCMgJeBc55NuEasPcgwjx2FuPdQd8neu drive: > files.lst
  2. this should work or something close to it.
    rclone copy --drive-root-folder-id 1oCMgJeBc55NuEasPcgwjx2FuPdQd8neu drive: drive: --files-from=files.lst --dry-run -vv
    note: change drive: to whatever your gdrive remote is named
1 Like
C:\Users\Home\Downloads\rclone\rclone-current-windows-amd64\rclone-v1.56.0-windows-amd64>rclone listremotes
CaMain:
CyberAvater:
dfg:
sdgnhb:
testn:

C:\Users\Home\Downloads\rclone\rclone-current-windows-amd64\rclone-v1.56.0-windows-amd64>rclone lsf --drive-root-folder-id 1mZrI-cihT33D-NwtlRZxwCvlYsorO6KH CyberAvater: > files.lst

C:\Users\Home\Downloads\rclone\rclone-current-windows-amd64\rclone-v1.56.0-windows-amd64>rclone copy --drive-root-folder-id 1mZrI-cihT33D-NwtlRZxwCvlYsorO6KH CyberAvater: CyberAvater: --files-from=files.lst --dry-run -vv
2021/08/15 09:45:50 DEBUG : rclone: Version "v1.56.0" starting with parameters ["rclone" "copy" "--drive-root-folder-id" "1mZrI-cihT33D-NwtlRZxwCvlYsorO6KH" "CyberAvater:" "CyberAvater:" "--files-from=files.lst" "--dry-run" "-vv"]
2021/08/15 09:45:50 DEBUG : Creating backend with remote "CyberAvater:"
2021/08/15 09:45:50 DEBUG : Using config file from "C:\\Users\\Home\\AppData\\Roaming\\rclone\\rclone.conf"
2021/08/15 09:45:50 DEBUG : CyberAvater: detected overridden config - adding "{SaXYQ}" suffix to name
2021/08/15 09:45:50 DEBUG : fs cache: renaming cache item "CyberAvater:" to be canonical "CyberAvater{SaXYQ}:"
2021/08/15 09:45:50 DEBUG : fs cache: switching user supplied name "CyberAvater:" for canonical name "CyberAvater{SaXYQ}:"
2021/08/15 09:45:50 ERROR : Google drive root '': Nothing to do as source and destination are the same
2021/08/15 09:45:50 NOTICE:
Transferred:              0 / 0 Byte, -, 0 Byte/s, ETA -
Elapsed time:         0.5s

2021/08/15 09:45:50 DEBUG : 2 go routines active

Thanks, but Shouldn't there be a one-line command to something as trivial as this?

You could do it something like this:

rclone copy --dry-run drive,root_folder_id=1oCMgJeBc55NuEasPcgwjx2FuPdQd8neu: drive:destination-dir --drive-server-side-across-configs

Not 100% sure the --drive-server-side-across-configs is needed or not to enable server side copies.

2 Likes

Hope you don't get mad, but I'm getting another error:

Failed to create file system for "drive,root_folder_id=0B_wmPHe0B1PFV0dWUEEycm9DT2M:": didn't find section in config file

that was a generic example, need to use your remote.

rclone copy --dry-run CyberAvater,root_folder_id=1oCMgJeBc55NuEasPcgwjx2FuPdQd8neu: CyberAvater:destination-dir --drive-server-side-across-configs

1 Like

I think that's what I did,

D:\CL\rclone-v1.56.0-windows-amd64>rclone listremotes
data_hoard:
dead_collection:

D:\CL\rclone-v1.56.0-windows-amd64>rclone copy --dry-run drive,root_folder_id=0B_wmPHe0B1PFV0dWUEEycm9DT2M: data_hoard: --drive-server-side-across-configs
2021/08/16 01:35:17 Failed to create file system for "drive,root_folder_id=0B_wmPHe0B1PFV0dWUEEycm9DT2M:": didn't find section in config file

Edit: Oh, I see now. Everything is working as expected, thanks!