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 Use File Compression in Windows to Save Disk Space

File compression is a valuable technique for saving disk space and managing files more efficiently on Windows systems. Windows provides built-in tools and features that allow users to compress files and folders easily. This article will guide you through the various methods of compressing files in Windows, including using File Explorer, Command Prompt (CMD), and PowerShell.

Using File Explorer

  1. Compressing a Single File or Folder:

    • Open File Explorer and navigate to the file or folder you want to compress.
    • Right-click on the file or folder and select "Properties."
    • In the Properties window, click on the "Advanced" button under the General tab.
    • Check the box that says "Compress contents to save disk space."
    • Click "OK," then "Apply," and choose whether to apply changes to this folder only or to all subfolders and files.
  2. Creating a Compressed (Zipped) Folder:

    • Open File Explorer and navigate to the location where you want to create a compressed folder.
    • Right-click in the directory, select "New," then "Compressed (zipped) Folder."
    • Name the new folder and press Enter. You can now drag and drop files into this folder to compress them.

Using Command Prompt (CMD)

  1. Compressing Files with Compact Command:

    • Open Command Prompt as an administrator.
    • Use the following command to compress a file or folder:
      compact /c "C:\Path\To\Your\FileOrFolder"
    • To check the compression status, use:
      compact "C:\Path\To\Your\FileOrFolder"
  2. Compressing All Files in a Directory:

    • To compress all files in a directory, use:
      compact /c /s:"C:\Path\To\Your\Directory"

Using PowerShell

  1. Compressing Files with Compress-Archive:

    • Open PowerShell as an administrator.
    • Use the Compress-Archive cmdlet to compress files or folders:
      Compress-Archive -Path "C:\Path\To\Your\FileOrFolder" -DestinationPath "C:\Path\To\Your\CompressedFile.zip"
  2. Compressing Multiple Files:

    • To compress multiple files into a single archive, specify each file path:
      Compress-Archive -Path "C:\Path\To\File1.txt", "C:\Path\To\File2.txt" -DestinationPath "C:\Path\To\Your\CompressedFiles.zip"

Conclusion

Windows provides several methods for file compression, each suitable for different scenarios. Whether you're using the graphical interface of File Explorer, the command-line power of CMD, or the scripting capabilities of PowerShell, you can efficiently manage your disk space by compressing files and folders.

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.