compact

Windows CMD · Files · available in the simulator

What it does

File and folder compression at the NTFS file system level.

Syntax

compact [/c | /u] [/s[:dir]] [/a] [/i] [/f] [/q] [archivo...]

Options and parameters

  • /C

    Compresses the specified files.

    compact /c /s:C:\Datos
  • /U

    Uncompresses the specified files.

  • /S

    Performs the operation on files in the specified directory and all subdirectories.

  • /A

    Includes hidden and system files.

  • /I

    Continues performing the operation even if errors occur.

  • /F

    Forces the operation on all specified files, even those already compressed.

  • /Q

    Reports only the most essential information.

    compact /q
  • /EXE

    Optimizes compression for executables that are read frequently.

Usage examples

  • compact /C archivo.txt
  • compact /U archivo.txt
  • compact /C /S carpeta
  • compact /q
  • compact /c /s:C:\Datos

Notes and common mistakes

  • Only works on NTFS volumes.
Practise compact

Related commands