# Save Workspace and Close All command

## Summary

Saves the workspace and closes all open files.

## Description

This command saves the full path names, the cursor positions, and other
settings of all currently open documents in EmEditor, then closes all open
documents. This command is equivalent to the [Save Workspace command](/en/cmd/file/save_workspace) followed by the [Close All command](/en/cmd/file/exit_all).

## How to Run

- Default Menu: None
- [All Commands](/en/cmd/tools/all_commands): **File** \> **Close**
\> **Save Workspace and Close All**
- Toolbar: None
- Status Bar: None
- Default Shortcut Key: None

## Plug-in Command ID

```
EEID_SAVE_WORKSPACE_QUIT_ALL (4332)
```

## Macros

## \[JavaScript\]

```javascript
editor.ExecuteCommandByID(4332);
```

## \[VBScript\]

```vbscript
editor.ExecuteCommandByID 4332
```
