> 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-python/reference/file/file.download.md).

# File.download

### Fil&#x65;**.**<mark style="color:purple;">**download**</mark>**(***path=os.getcwd(), \*, overwrite=False, progress=True***)** → str

Downloads the file to the specified path, or the current working directory if no path is specified.&#x20;

{% hint style="info" %}
If you are downloading multiple files from a table or query result, you'll see significantly better performance (due to parallelization) by calling [Table.download\_files](/api/client-libraries/redivis-python/reference/directory/directory.download.md) or [Query.download\_files](broken://pages/Hd08D3VG0Ypwi7cxV0oo).
{% endhint %}

### **Parameters:**

**`path` :&#x20;*****str*****&#x20;| pathlib.Path*****, default os.getcwd()***\
The path for where to download the file. If the path represents a directory that already exists, or ends in a path separator (e.g., `/`), the path is assumed to be a directory, and the file will be downloaded into that directory (using the name of the file on Redivis). If the path doesn't end in a directory, the path is assumed to include the name of the downloaded file. If the path specifies any (sub)directories that do not exist, they'll automatically be created. If no path is specified, the file is downloaded to the current working directory.

**`overwrite` :&#x20;*****bool, default False***\
Whether to overwrite any existing file if the same file already exists at the download path.

**`progress` :&#x20;*****bool, default True***\
Whether to show a progress bar for the download.

### **Returns:**

**str** (the path of the downloaded file)

### Examples

```python
f = redivis.file("4c10-d8rqhswh8.zz7AB9NJB2ctNpDGKbRD7w")

f.download() # download to current working directory
f.download("new_name.tiff") # download to current working directory, and rename to new_name.tiff
f.download("/some/path/") # downloaded as /some/path/bogota.tiff
f.download("/some/path/new_name.tiff") # downloaded as /some/path/new_name.tiff

print(f.properties) 
# { 
#   "kind": "rawFile", 
#   "id": "4c10-d8rqhswh8.zz7AB9NJB2ctNpDGKbRD7w", 
#   "uri': '/rawFiles/4c10-d8rqhswh8.zz7AB9NJB2ctNpDGKbRD7w",
#   "name": "bogota.tiff", 
#   "md5Hash": "6pQS54rKwQphRtJbLlHz7Q==", 
#   "contentType": "image/tiff", 
#   "size": 262674
# }
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.redivis.com/api/client-libraries/redivis-python/reference/file/file.download.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
