# 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](https://docs.win32.run/developers/pick-files#returns)

### Return

`Promise<Void>`


---

# Agent Instructions: 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.
