tar command are available for repeatable or scripted ZIP creation.
Before creating the ZIP
Check these points before compressing a large collection:
- Keep all source files closed so Windows can read them without sharing conflicts.
- Confirm that the destination drive has enough free space for the completed archive.
- Move files into one temporary folder first if they are scattered across many locations.
- Remember that ZIP compression may not substantially shrink JPEG, MP4, MP3, PDF, and other already-compressed files.
- Do not assume that a ZIP file is encrypted. A standard ZIP created by Windows has no password protection.
Warning: Microsoft notes that encrypted files added to a standard Windows zipped folder can be unencrypted when extracted. Do not use the built-in ZIP feature to protect sensitive material. Use an approved encrypted archive tool or another secure sharing method instead.
Create a ZIP file in Windows 11
Current Windows 11 releases provide a Compress to menu in File Explorer.
- Press Windows key + E to open File Explorer.
- Browse to the files or folder you want to compress.
- Select the items:
- Select one file or folder by clicking it.
- Hold Ctrl while clicking to select multiple individual items.
- Select a continuous range by clicking the first item, holding Shift, and clicking the last item.
- Press Ctrl + A to select everything in the current folder.
- Right-click one of the selected items.
- Select Compress to.
- Select ZIP File.
- Enter a name for the new ZIP file and press Enter.
Windows creates the ZIP in the same location as the selected items. If several items were selected, Windows proposes a name based on one of them, but you can replace it immediately.
If Compress to does not appear, use the classic-menu procedure in the next section.
Create a ZIP file in Windows 10 or through the classic menu
Microsoft continues to document the Send to method for Windows 10 and Windows 11.
- Open File Explorer.
- Select the files or folder you want to include.
- Right-click the selection.
- In Windows 11, select Show more options if the classic menu is not already displayed.
- Point to or select Send to.
- Select Compressed (zipped) folder.
- Type the name you want and press Enter.
A new
.zipfile appears beside the original items. The source files are not deleted or moved.
You can also open the Windows 11 classic context menu directly by selecting the files and pressing Shift + F10.
Use the Windows 11 compression wizard
Windows 11 versions containing the expanded archive features introduced with the June 25, 2024 KB5039302 preview and incorporated into later releases can create additional archive formats and expose more compression controls.
For an ordinary ZIP, the one-click ZIP File option remains faster. Use the wizard when you need to review the format, compression method, or archive destination.
- Open File Explorer and select the required files or folders.
- Right-click the selection.
- Select Compress to.
- Select Additional options.
- Set the archive format to ZIP.
- Review the available compression settings.
- Choose the destination and archive name.
- Start the compression operation.
The options displayed can vary with the installed Windows 11 version and the selected archive format. Windows 11 version 24H2 and later also support built-in operations for formats including ZIP, 7z, RAR, and TAR, although encrypted archive operations are not supported by the built-in interface.
Add files to an existing ZIP
You do not have to recreate a ZIP when an item was omitted.
- Open File Explorer.
- Double-click the existing ZIP file to open it as a compressed folder.
- Open a second File Explorer window containing the files you want to add.
- Select the additional files or folders.
- Drag them into the open ZIP window.
- Wait for Windows to finish copying the items into the archive.
To remove an item, open the ZIP, select the item, and press Delete. This changes the archive itself, so make a backup first if you might need the original version.
For a scripted update, PowerShell can add new files and replace older copies by using the
-Updateparameter.
Create a ZIP with PowerShell
The
Compress-Archivecmdlet is useful when you need exact source and destination paths or want to repeat the same operation. It is included through the Microsoft.PowerShell.Archive module in Windows PowerShell and current PowerShell releases.
Zip a folder and include the folder itself
- Right-click Start.
- Open Terminal, Windows PowerShell, or Terminal (Admin) if the destination requires administrator permission.
- Run:
Compress-Archive -Path "C:\Reference" -DestinationPath "C:\Archives\Draft.zip"The ZIP contains a top-level
Referencefolder and everything under it.
Zip only the contents of a folder
Use a wildcard after the folder path:
Compress-Archive -Path "C:\Reference\*" -DestinationPath "C:\Archives\Draft.zip"This places the contents of
Referenceat the root of the ZIP instead of creating a top-level
Referencefolder.
Zip several specific files
Separate the source paths with commas:
Compress-Archive -LiteralPath "C:\Work\Report.docx","C:\Work\Budget.xlsx" -DestinationPath "C:\Archives\Documents.zip"
-LiteralPathis useful when names contain characters that PowerShell could otherwise interpret as wildcards.
Replace an existing ZIP
Warning: The following command overwrites the archive at the destination. Copy the existing ZIP elsewhere first if you may need to recover it.
Compress-Archive -Path "C:\Reference\*" -DestinationPath "C:\Archives\Draft.zip" -Force
Add or update files in an existing ZIP
Compress-Archive -Path "C:\Reference\*" -DestinationPath "C:\Archives\Draft.zip" -UpdateThis adds new items and replaces older archived versions with files having the same names.
PowerShell uses Optimal compression by default. You can specify another supported level:
Compress-Archive -Path "C:\Reference\*" -DestinationPath "C:\Archives\Draft.zip" -CompressionLevel FastestSupported values are
Optimal,
Fastest, and
NoCompression.
Compress-Archivehas two important limitations:
- It ignores hidden files and folders.
- Its underlying API limits individual files to 2 GB.
Use File Explorer, Windows
tar, or another suitable archive utility if either limitation affects the job.
Create a ZIP with the built-in tar command
Windows includes a command-line
tarutility based on
bsdtar. Despite its name, it can create ZIP archives by selecting the format from the output extension.
- Open Windows Terminal, PowerShell, or Command Prompt.
- Change to the parent folder containing the folder you want to archive:
cd /d "C:\Projects"
- Create the ZIP:
tar -caf ProjectBackup.zip .\CurrentProjectThe options mean:
-ccreates an archive.-aselects the archive format from the output extension.-fidentifies the archive filename.
Because the output filename ends in
.zip, Windows creates a ZIP rather than a TAR archive.
To inspect the completed archive without extracting it, run:
tar -tf ProjectBackup.zipThe command prints the archive’s file and folder names in the terminal.
Rename or move the completed ZIP
To rename the archive:
- Select the ZIP in File Explorer.
- Press F2.
- Enter the new name.
- Press Enter.
If file extensions are visible, retain the
.zipextension. Changing only the extension does not convert an archive to another format.
To move the ZIP, use Ctrl + X and Ctrl + V, or drag it to the destination. Copy it with Ctrl + C and Ctrl + V if you want to retain the original.
Verify that the ZIP works
Verify the archive before deleting source files, uploading it, or sending it to someone else.
- Confirm that the ZIP appears in the intended location.
- Right-click it and select Properties.
- Check that Type of file identifies it as a compressed or ZIP file.
- Double-click the ZIP.
- Confirm that the expected files and folders appear.
- Right-click the ZIP and select Extract All.
- Choose a temporary test folder.
- Select Extract.
- Open several extracted files to confirm that they are usable.
Compare the ZIP size with the total size of the source data. A ZIP containing videos, photographs, or existing archives may be nearly as large as the originals. That does not indicate a failure.
Do not delete the original data until the extraction test succeeds and any required backup has been confirmed.
Fix missing or failed ZIP creation
Compress to is missing
- On Windows 11, right-click the selection and check Show more options > Send to > Compressed (zipped) folder.
- Press Shift + F10 to open the classic context menu.
- Restart File Explorer or restart Windows if the context menu is incomplete.
- Install applicable Windows updates through Settings > Windows Update > Check for updates.
The expanded Compress to interface depends on the Windows 11 version and installed updates. The classic Send to method remains the appropriate fallback.
Windows says access is denied
The source or destination may be protected.
- Create the ZIP in your Documents or Desktop folder first.
- Avoid writing directly to protected locations such as
C:\WindowsorC:\Program Files. - Confirm that you have permission to read every source item.
- Open Terminal as administrator only when the operation genuinely requires elevated access.
Creating an archive in a user folder and moving it afterward is generally safer than running every compression operation as administrator.
The destination ZIP already exists
File Explorer may offer to replace or rename the file. In PowerShell, use one of these approaches:
- Choose another destination name.
- Use
-Updateto add or refresh content. - Use
-Forceto replace the archive completely.
Back up the old ZIP before using
-Force.
The ZIP is not much smaller
This is normal for already-compressed formats, including:
- JPEG and many other image formats
- MP3 and other compressed audio
- MP4 and other compressed video
- Existing ZIP, 7z, and RAR archives
- Many PDF and modern Office files
ZIP still provides the convenience of packaging several items into one file even when it saves little storage space.
Files are missing from a PowerShell ZIP
Compress-Archiveomits hidden files and folders. Check the source in File Explorer with View > Show > Hidden items. If the missing content is hidden, use File Explorer, Windows
tar, or another archive method that includes it.
Also check whether the command used
*.*instead of
*. With
Compress-Archive,
Folder\*.*selects files in the root but does not include its subfolders, while
Folder\*includes the folder’s files and subdirectories.
ZIP files open in the wrong app
Repair the
.zipfile association:
- Open Settings.
- Select Apps > Default apps.
- Search for
.zip. - Select the current associated app.
- Choose File Explorer or the ZIP utility you intend to use.
Changing the default app affects how ZIP files open; it does not alter or recreate existing archives.
The archive is too large to email or upload
Creating a ZIP does not bypass a service’s attachment or upload limit.
- Remove unnecessary files.
- Split the source into several smaller ZIP files.
- Upload the archive to an approved cloud-storage service and share a link.
- Check whether the receiving service has a maximum file-size or total-upload limit.
After splitting the data, extract each ZIP into a test folder and verify that the complete set of expected files is present.