> For the complete documentation index, see [llms.txt](https://docs.win32.run/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.win32.run/developers/3rd-party-apps/save-file.md).

# Save File

Save a file without invoking File Saving Dialog.

Similar to `win32.get_file` method, you have to have a win32 file id first, which could obtain when you first save the file using or `win32.pick_files` or `win32.save_file_as`

```javascript
await win32.save_file(file, id)
```

### Params

#### file

`File`

Content of the file you want to save to win32. A File object. See [Mozilla Docs](https://developer.mozilla.org/en-US/docs/Web/API/File)

#### id

`String`

id of the file. Refer to [Pick Files](/developers/3rd-party-apps/pick-files.md#returns)

### Return

`Promise<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:

```
GET https://docs.win32.run/developers/3rd-party-apps/save-file.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
