Skip to main content
Question

How to change the default location when downloading a file using the CLI Rest API call.

  • May 23, 2025
  • 1 reply
  • 11 views

Forum|alt.badge.img

Is it possible to change the default location of where documents are downloaded to when using the CLI Rest API call to download files?

E.g.

When I fun the following command in PowerShell:

Invoke-Expression "box files:versions:download --overwrite $fileId $versionId"

the file is downloaded to the following path: C:\Users\admin\Downloads\Box-Downloads.

How can I change this path?

1 reply

Forum|alt.badge.img

Hi Raj,

Did you try using the save-to-file-path flag?

 --save-to-file-path=save-to-file-path  Override default file path to save

Let us know if it works.