Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade

How to Compress Files in Windows: Discover How to Use Built-in Tools and Commands

File compression is a crucial technique used to reduce the size of files, making them easier to store and transfer. Windows provides several built-in tools and commands to compress files effectively. In this article, we'll explore how to use these tools, including examples of how to execute file compression via the Command Prompt (CMD).

Using File Explorer to Compress Files

Windows File Explorer offers a straightforward way to compress files into a ZIP archive:

  1. Select Files/Folders: Open File Explorer and navigate to the files or folders you wish to compress.
  2. Right-Click: Right-click on the selected items.
  3. Send to Compressed (zipped) Folder: Choose "Send to" and then "Compressed (zipped) folder." Windows will create a ZIP file in the same directory.

Using Command Prompt (CMD) to Compress Files

For those who prefer using the command line, Windows provides the compact command, which is primarily used for NTFS compression. However, for creating ZIP files, PowerShell is more versatile.

Example: Compressing Files Using PowerShell

  1. Open PowerShell: Press Win + X and select "Windows PowerShell" from the menu.
  2. Run the Compression Command: Use the following command to compress files into a ZIP archive:

    Compress-Archive -Path C:\Path\To\Your\Files\* -DestinationPath C:\Path\To\Your\Archive.zip
    • -Path: Specifies the path to the files you want to compress.
    • -DestinationPath: Specifies the path where the ZIP file will be created.

Example: Using Compact Command for NTFS Compression

The compact command is used to enable or disable NTFS compression on files and directories:

  1. Open Command Prompt: Press Win + R, type cmd, and press Enter.
  2. Compress Files Using Compact: Use the following command:

    compact /c /s:C:\Path\To\Your\Files
    • /c: Compresses the specified files.
    • /s: Applies the command to all subdirectories.

Conclusion

Windows provides multiple methods for file compression, each suited to different needs. Whether you prefer the graphical interface of File Explorer or the command line power of PowerShell and CMD, you have the tools to efficiently manage file sizes.

To share Download PDF

Gostou do artigo? Deixe sua avaliação!
Sua opinião é muito importante para nós. Clique em um dos botões abaixo para nos dizer o que achou deste conteúdo.