DEV Community

Victor James
Victor James

Posted on • Originally published at on



The COMPRESS windows command-line tool is to compress one or more files.

CMD Line

CMD Line is a text-based interface that transfers the command from the user to the OS.

CLI-Command Line Interpreter

The command-line interpreter (CLI) for windows is CMD.EXE. Also, you can use PowerShell which can automize many system administration tasks and these tasks are not approachable in command prompt. With the help of the CLI, you can communicate with your system by typing the text in commands. As a result, your system answers to the text that you have typed previously, and then the user can proceed with the next command line that shows up.

To open the Run command Window

Run command window helps you to run programs, open the files and folders. And there are several ways to open up the run command dialog box. This run command box is useful for you to head straight to the destined program easily.

By using the Keyboard shortcut Key:


The shortcut key method to the run command box is the most commonly used one. Also, this method is in all versions of Windows. You need to press the Windows+ R key concurrently to open the Run command dialog box.

Run command box
Run command box

What does the COMPRESS command do?

The Compress windows command line tool compresses one or more files.


COMPRESS [-R] [-D] [-S] [-Z | -ZX] Source Destination

COMPRESS -R [-D] [-S] [-Z | -ZX] Source [Destination]

Enter fullscreen mode Exit fullscreen mode

Parameter Explanation:

  • -RRenames the compressed files.
  • -DUpdates the compressed files only if out of date.
  • -SSuppresses the copyright information.
  • -ZXLZX compression. This is default compression.
  • -ZMS-ZIP compression.
  • SourceSource file specification. Wildcards can be used.
  • DestinationDestination file | path specification.
    • Destination can be a directory.
    • If the source is a Multiple file and if -r is not defined. Destination must be a Directory.


COMPRESS demo.txt compressed.txt


COMPRESS -R *.exe *.dll compressed_dir

Enter fullscreen mode Exit fullscreen mode


In this article, we have seen the COMPRESS windows command-line tool , which is used to compress one or more files. If you have any suggestions are queries, let us know in the comment section.

Read Further

  • CON CON means console. And the console is an input/output device. This console is not a command. Read further for a detailed explanation with examples.
  • BITSADMIN The BITSADMIN command-line tool manages the background intelligent transfer service.
  • COMPRESS The COMPRESS, a window command-line tool, which is used to compress one or more files.
  • CD This windows command-line tool changes the directory and moves to the specific folder. CHDIR is the equivalent word of CD.
  • CMD CMD windows command is to start a new shell in a command or executable program.

The post COMPRESS appeared first on Windows Commands- SS64 Commands.

Discussion (0)