Download file from Box using file ID

What is the problem you are having with rclone?

rclone copyto can't read a file from Box using file ID

We have a substantial codebase that uses another program to read data from Box, and we need to migrate to using rclone. It often relies on reading a file directly using the file ID, rather than using a folder ID and file name. Before committing to a large refactor, I'm trying to figure out if rclone has this functionality or not.

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

rclone v1.68.2
- os/version: ubuntu 22.04 (64 bit)
- os/kernel: 5.14.0-427.57.1.el9_4.x86_64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.23.3
- go/linking: static
- go/tags: none

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

Box

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

# this works
rclone copyto 'remote:testing_app_meta.yaml' --box-root-folder-id 194642947573 '/tmp/RtmpWHCXFV/wq0pdC3tts/testing_app_meta.yaml'

# this doesn't, but I'm wondering if there's any functionality like this
# 11402... is the file ID of testing_app_meta.yaml
rclone copyto 'remote:1140207799847' '/tmp/RtmpWHCXFV/wq0pdC3tts/testing_app_meta.yaml' -vv

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

[remote]
type = box
token = XXX

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

2025/04/18 15:13:25 DEBUG : rclone: Version "v1.68.2" starting with parameters ["rclone" "copyto" "remote:1140207799847" "/tmp/RtmpWHCXFV/wq0pdC3tts" "-vv"]
2025/04/18 15:13:25 DEBUG : Creating backend with remote "remote:1140207799847"
2025/04/18 15:13:25 DEBUG : Using config file from "/usr/home/ebrockmann/.config/rclone/rclone.conf"
2025/04/18 15:13:26 CRITICAL: Failed to create file system for "remote:1140207799847": pre-upload check: Error "access_denied_insufficient_permissions" (403): Access denied - insufficient permission

welcome to the forum,

well, nothing worse than a large refactor.


a workaround might be, write a simple function to lookup the filename(s) by id, using something like

rclone lsf remote: --format=pi --csv --files-only --box-root-folder-id=221848298276
testing_app_meta.yaml,1140207799847

or

lsjson remote: --files-only --box-root-folder-id=221848298276

or
https://rclone.org/rc/#operations-list


Copy files by ID for box backend #8346

box: please implement copyid #5150


might want to rclone selfupdate

Thank you for this information, it is definitely a possible workaround! lsjson + filtering for the input file ID would definitely get me the info I need. It looks like listing the files will be too much of a time lag right now because of how many files there are, but I will keep playing around with it!

welcome


one reason is that rclone box remotes lack suppport for ListR

can see that from rclone docs or by running

 rclone backend features box: | grep "ListR"
                "ListR": false,

with many backends such as gdrive, by default, every rclone user in the world shares the same client id+secret.
with leads to throttling and reduced performace.
the workaround is to create your own client id+secret.

this is what my box remote looks like

rclone config redacted box:
[box]
type = box
client_id = XXX
client_secret = XXX
token = XXX

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