question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

File Download: Create destination path when not existing

See original GitHub issue

Is your feature request related to a problem? Please describe.

When we download files the destination folder has to exist before the file is downloaded. If we download multiple files where they happen to have the same name that will overwrite the file.

So the feature will be

box files:download <file_id> --destination=<path_that_does_not_exist>

That will download the file after the path was created if it doesn’t exist.

Describe the solution you’d like

We use a bulk file and it would be good to be able to define the path and if the path does not exist, then the CLI should create the path

Describe alternatives you’ve considered

Create the complete folder structure before the download, but it adds a step that is cumbersome. Or we have to wrap the CLI commands in Powershell scripts

Additional context

There is a matching request for folder https://github.com/box/boxcli/issues/267

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jacquesvandermerwecommented, Apr 29, 2022

Thanks @mgrytsai just linked the counterpart for folders above. For reference https://github.com/box/boxcli/issues/267

That should be similar to the file path request

0reactions
mwwodacommented, Sep 15, 2022

Done under #393

Read more comments on GitHub >

github_iconTop Results From Across the Web

wget -O for non-existing save path? - Stack Overflow
To download a file with wget, into a new directory, use --directory-prefix without - ...
Read more >
The Ultimate Guide to Copying Files and Folders Using Xcopy
If the destination folder does not exist, Xcopy creates the destination folder using the /I option.
Read more >
How To Fix Destination Path Too Long [2022] - YouTube
When you make an effort to copy a file from the location, the destination path calculated is the sum of characters existing in...
Read more >
Working with files and folders - PowerShell - Microsoft Learn
This article discusses how to deal with specific file and folder ... If the destination file already exists, the copy attempt fails.
Read more >
Destination Path Too Long Error When Moving/Copying a File
Solution 1. Rename Parent Folder to Decrease the Full Path ... The simplest way is to shorten the name of the parent folders,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found