Create a ZIP archive from a folder
Build a paste-ready command, then review its compatibility and effects before running it.
Compress-Archive -Path <folder> -DestinationPath <archive-file>Complete required fields to copy the generated command.
Compatibility
WindowsVerified for Windows using powershell syntax.
Operational knowledgereview due 2027-01-19
RequirementsCompress-ArchiveCompress-Archive must be installed and available on PATH.
Version supportCompress-Archive Current supported releasesVerified for windows using powershell syntax; consult compatibility notes for platform-specific differences.
Expected signals(no terminal output on success)Representative successful output; values vary with the selected target and system state.
Known errorsCompress-Archive: command not foundCompress-Archive is missing or is not available on PATH.
VerifyCompress-Archive -Path {{folder}} -DestinationPath {{archiveFile}}Re-run the corresponding read-only inspection and confirm the intended state.Rollback noteNo universal automatic rollback is available. Capture the current state and use the tool-specific recovery procedure before applying changes.
Command breakdown
01Compress-ArchiveCommandRuns the Compress-Archive stage of this one-liner.
02-PathOptionConfigures Compress-Archive with the -Path option.
03<folder>ParameterA value supplied in the Fill parameters section.
04-DestinationPathOptionConfigures Compress-Archive with the -DestinationPath option.
05<archive-file>ParameterA value supplied in the Fill parameters section.
Example input
Compress-Archive -Path C:\Build\release -DestinationPath C:\Build\release.zip
Example output
(no terminal output on success)
Created C:\Build\release.zip from C:\Build\release.
Illustrative output — exact values vary by system and data.
Official sources