Command description
Create an archive from the specified file or folder, save it to the target path, and return the generated archive path. Extract it with another archive utility or the Extract Archive command.
| input parameters | Input parameter type | Description |
|---|
| Path to Archive | str | Full path, for example C:\xx |
| Save Path | str | Save the compressed file to this folder |
| Archive Password | str | Optional |
Command Output Parameters
| Output parameters | Output parameter type | Description |
|---|
| Archive File Path | str | The full path of the compressed file |
Edge Cases
- The command reports an error if Path to Archive does not exist. It can point to a file or folder.
- When Save Path is empty, the archive is created beside the source path and uses the source name with a
.zip extension.
- If Save Path has no extension,
.zip is appended automatically. An existing archive is not overwritten; the new archive receives a suffix such as _1 or _2.
- A missing parent directory is created automatically. The command reports an error if compression fails, the password is invalid, or 7-Zip cannot run.