> For the complete documentation index, see [llms.txt](https://docs.redivis.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.redivis.com/api/client-libraries/redivis-r/reference/directory/directoryusddownload.md).

# Directory$download

### Directory$<mark style="color:purple;">download</mark>(*path=getwd(), overwrite=FALSE, max\_results=NULL, progress=TRUE, max\_parallelization=NULL, max\_concurrency=NULL*) → void

Downloads files associated with the directory to the specified at path.

### **Parameters:**

**`path` :&#x20;*****str, default getwd()***\
The path of the directory to download files. Will automatically create the directory if it doesn't exist. If not specified, defaults to the current working directory.

**`overwrite` :&#x20;*****bool, default FALSE***\
Whether to overwrite any existing files when downloading. If FALSE, will throw an error if a file with the same name already exists at the provided path, unless if the file is a duplicate.

**`max_results` :&#x20;*****int, default NULL***\
If specified, will only download up to max\_results files

**`progress` :&#x20;*****bool, default TRUE***\
Whether to show progress bar.

**`max_parallelization` :&#x20;*****int, default  NULL***\
The maximum number of threads to use to download files. If unset (recommended), will be determined dynamically based on the number of files, their size, and available cores on your machine.

**`max_concurrency` :&#x20;*****int, default NULL***\
The maximum total concurrency when downloading files. Should be higher than max\_parallelization, as multiple files are downloaded concurrently per thread. If unset (recommended), will be determined dynamically based on the number of files, their size, and available cores on your machine.

### **Returns:**&#x20;

**void**


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.redivis.com/api/client-libraries/redivis-r/reference/directory/directoryusddownload.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
