Rclone unable to get public link of file that contains space in filename

What is your rclone version (output from rclone version)

1.54.0

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Ubuntu 20.04.2 LTS

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

Google Drive

A log from the command with the -vv flag

$ rclone lsf Remote:Untitled 2>&1 | tee fn

Copy of file.mp4
file.mp4

$ nm="$(cat fn)" && for i in ${nm[*]}; do rclone link -vv "Remote:Untitled/$i"; done

2021/03/08 08:02:59 DEBUG : rclone: Version "v1.54.0" starting with parameters ["rclone" "link" "-vv" "Remote:Untitled/Copy"]
2021/03/08 08:02:59 DEBUG : Using config file from "/home/ubuntu/.config/rclone/rclone.conf"
2021/03/08 08:02:59 DEBUG : Creating backend with remote "Remote:Untitled/Copy"
2021/03/08 08:03:00 DEBUG : Google drive root 'Untitled/Copy': root_folder_id = "0AMfAZmfYZGM4Uk9PVA" - save this in the config to speed up startup
2021/03/08 08:03:02 DEBUG : Google drive root 'Untitled/Copy': attempting to share single file ''
2021/03/08 08:03:02 DEBUG : 4 go routines active
2021/03/08 08:03:02 Failed to link: object not found
2021/03/08 08:03:02 DEBUG : rclone: Version "v1.54.0" starting with parameters ["rclone" "link" "-vv" "Remote:Untitled/of"]
2021/03/08 08:03:02 DEBUG : Using config file from "/home/ubuntu/.config/rclone/rclone.conf"
2021/03/08 08:03:02 DEBUG : Creating backend with remote "Remote:Untitled/of"
2021/03/08 08:03:02 DEBUG : Google drive root 'Untitled/of': root_folder_id = "0AMfAZmfYZGM4Uk9PVA" - save this in the config to speed up startup
2021/03/08 08:03:04 DEBUG : Google drive root 'Untitled/of': attempting to share single file ''
2021/03/08 08:03:05 DEBUG : 4 go routines active
2021/03/08 08:03:05 Failed to link: object not found
2021/03/08 08:03:05 DEBUG : rclone: Version "v1.54.0" starting with parameters ["rclone" "link" "-vv" "Remote:Untitled/file.mp4"]
2021/03/08 08:03:05 DEBUG : Using config file from "/home/ubuntu/.config/rclone/rclone.conf"
2021/03/08 08:03:05 DEBUG : Creating backend with remote "Remote:Untitled/file.mp4"
2021/03/08 08:03:05 DEBUG : Google drive root 'Untitled/file.mp4': root_folder_id = "0AMfAZmfYZGM4Uk9PVA" - save this in the config to speed up startup
2021/03/08 08:03:07 DEBUG : fs cache: adding new entry for parent of "Remote:Untitled/file.mp4", "Remote:Untitled"
2021/03/08 08:03:07 DEBUG : Google drive root 'Untitled': attempting to share single file 'file.mp4'
https://drive.google.com/open?id=1k0uwEYWhdYAx1nEaxr44-z9_7x7UGD7E
2021/03/08 08:03:08 DEBUG : 4 go routines active
2021/03/08 08:03:08 DEBUG : rclone: Version "v1.54.0" starting with parameters ["rclone" "link" "-vv" "Remote:Untitled/file.mp4"]
2021/03/08 08:03:08 DEBUG : Using config file from "/home/ubuntu/.config/rclone/rclone.conf"
2021/03/08 08:03:08 DEBUG : Creating backend with remote "Remote:Untitled/file.mp4"
2021/03/08 08:03:09 DEBUG : Google drive root 'Untitled/file.mp4': root_folder_id = "0AMfAZmfYZGM4Uk9PVA" - save this in the config to speed up startup
2021/03/08 08:03:10 DEBUG : pacer: low level retry 1/10 (error googleapi: Error 403: Rate Limit Exceeded, rateLimitExceeded)
2021/03/08 08:03:10 DEBUG : pacer: Rate limited, increasing sleep to 1.830560147s
2021/03/08 08:03:10 DEBUG : pacer: low level retry 2/10 (error googleapi: Error 403: Rate Limit Exceeded, rateLimitExceeded)
2021/03/08 08:03:10 DEBUG : pacer: Rate limited, increasing sleep to 2.028997436s
2021/03/08 08:03:12 DEBUG : pacer: Reducing sleep to 0s
2021/03/08 08:03:14 DEBUG : fs cache: adding new entry for parent of "Remote:Untitled/file.mp4", "Remote:Untitled"
2021/03/08 08:03:15 DEBUG : Google drive root 'Untitled': attempting to share single file 'file.mp4'
https://drive.google.com/open?id=1k0uwEYWhdYAx1nEaxr44-z9_7x7UGD7E
2021/03/08 08:03:16 DEBUG : 4 go routines active

Hi, welcome to the forum.

Your problem is not with rclone, though, it is with shell looping that splits on whitespace.

Maybe try something like this (untested):

while read i; do rclone link -vv "Remote:Untitled/$i"; done < fn
1 Like

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