Rclone --files from not working as expected

What is the problem you are having with rclone?

I am trying to upload files from a local directory to a remote bucket. The files to upload come should come from the file files.list with the following content:

C:\rclone>type files.list
C:\rclone\data\AAR-160.jpg
C:\rclone\data\AAR-small.jpg
C:\rclone\data\AAR.jpg

the files exist in the filesystem:

C:\rclone\data>dir
 Volume in drive C has no label.
 Volume Serial Number is F868-2CD3

 Directory of C:\rclone\data

19-12-2023  16:10    <DIR>          .
19-12-2023  16:10    <DIR>          ..
19-12-2023  15:02             6.040 AAR-160.jpg
19-12-2023  15:02             1.630 AAR-small.jpg
19-12-2023  15:01            38.292 AAR.jpg

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

rclone v1.65.0

  • os/version: Microsoft Windows 10 Pro 22H2 (64 bit)
  • os/kernel: 10.0.19045.3803 (x86_64)
  • os/type: windows
  • os/arch: amd64
  • go/version: go1.21.4
  • go/linking: static
  • go/tags: cmount

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

Cloudflare R2

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

rclone --config c:\rclone\rclone.conf copy --files-from c:\rclone\files.list C:\rclone\data cloudflare:test -vv

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[cloudflare]
type = s3
provider = Cloudflare
access_key_id = XXX
secret_access_key = XXX
endpoint = https://XXX.r2.cloudflarestorage.com

A log from the command that you were trying to run with the -vv flag

2023/12/19 16:15:03 DEBUG : rclone: Version "v1.65.0" starting with parameters ["rclone" "--config" "c:\\rclone\\rclone.conf" "copy" "--files-from" "c:\\rclone\\files.list" "C:\\rclone\\data" "cloudflare:test" "-vv"]
2023/12/19 16:15:03 DEBUG : Creating backend with remote "C:\\rclone\\data"
2023/12/19 16:15:03 DEBUG : Using config file from "c:\\rclone\\rclone.conf"
2023/12/19 16:15:03 DEBUG : fs cache: renaming cache item "C:\\rclone\\data" to be canonical "//?/C:/rclone/data"
2023/12/19 16:15:03 DEBUG : Creating backend with remote "cloudflare:test"
2023/12/19 16:15:03 DEBUG : Resolving service "s3" region "us-east-1"
2023/12/19 16:15:04 DEBUG : S3 bucket test: Waiting for checks to finish
2023/12/19 16:15:04 DEBUG : S3 bucket test: Waiting for transfers to finish
2023/12/19 16:15:04 INFO  : There was nothing to transfer
2023/12/19 16:15:04 INFO  :
Transferred:              0 B / 0 B, -, 0 B/s, ETA -
Elapsed time:         0.6s

2023/12/19 16:15:04 DEBUG : 4 go routines active

as per docs:

Paths within the --files-from file are interpreted as starting with the root specified in the rclone command

which in your case means that you attempt to copy e.g.:

C:\rclone\data\C:\rclone\data\AAR-160.jpg

none such file(s) exist so rclone correctly reports that there was nothing to transfer"

One way to fix it is to change files.list to:

AAR-160.jpg
AAR-small.jpg
AAR.jpg
C:\rclone>type files.list
AAR-160.jpg
AAR-small.jpg
AAR.jpg

same result:

C:\rclone>rclone --config c:\rclone\rclone.conf copy --files-from c:\rclone\files.list C:\rclone\data cloudflare:test -vv
2023/12/19 16:36:20 DEBUG : rclone: Version "v1.65.0" starting with parameters ["rclone" "--config" "c:\\rclone\\rclone.conf" "copy" "--files-from" "c:\\rclone\\files.list" "C:\\rclone\\data" "cloudflare:test" "-vv"]
2023/12/19 16:36:20 DEBUG : Creating backend with remote "C:\\rclone\\data"
2023/12/19 16:36:20 DEBUG : Using config file from "c:\\rclone\\rclone.conf"
2023/12/19 16:36:20 DEBUG : fs cache: renaming cache item "C:\\rclone\\data" to be canonical "//?/C:/rclone/data"
2023/12/19 16:36:20 DEBUG : Creating backend with remote "cloudflare:test"
2023/12/19 16:36:20 DEBUG : Resolving service "s3" region "us-east-1"
2023/12/19 16:36:20 DEBUG : S3 bucket test: Waiting for checks to finish
2023/12/19 16:36:20 DEBUG : S3 bucket test: Waiting for transfers to finish
2023/12/19 16:36:20 INFO  : There was nothing to transfer
2023/12/19 16:36:20 INFO  :
Transferred:              0 B / 0 B, -, 0 B/s, ETA -
Elapsed time:         0.3s

2023/12/19 16:36:20 DEBUG : 4 go routines active

Must be some Windows specific quirk.

Your rclone copy root is C:\rclone\data

try:

\AAR-160.jpg
\AAR-small.jpg
\AAR.jpg

or change root to C:\rclone\data\

I do not have Windows to test so try what works.

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