This guide explains how to zip files using the command prompt. You can zip files through Command Prompt using the tar command. This command line tool helps you to extract files and create archives. However, it only works in Windows 10 or later.

Here is a simple guide to zip files using the Command Prompt-

  1. Click the “Win” key to open the Start Menu.
  2. Type “Command Prompt” in the search bar and click on “Run as administrator” on the right side.
  3. In the Command Prompt window, type the following command and press Enter (replace “Place” with the location of your files)-
    cd Place
  4. Type “dir” and press Enter to list the files in the folder.
  5. To compress all files in the folder, type the below command and press Enter. Replace “Compressed” with the name you want for the zip file, and “FileExt” with the type of files you are compressing-
    tar -a -c -f Compressed.zip *.FileExt
  6. To compress a single file, type the subsequent command and press Enter. Replace “Compressed” with the name you want for the zip file, “FileExt” with the file’s extension, and “FileName” with the name of the file-
    tar -a -c -f Compressed.zip FileName.FileExt

That is how you can zip files using Command Prompt. We hope you found this guide useful. For the latest articles, check our knowledge base section regularly.

You can also read about How to Unzip Files via Command Prompt. Unzipping files via the Command Prompt allows for quick and efficient file extraction without the need for additional software.

Popular Posts You May Read

Explore more hosting insights, tips and industry updates.

How to Define the Custom Port for MS SQL Remote Access?

If you want to assign a TCP/IP port number to the SQL Server Database Engine.…

How to locate and edit your hosts file in Windows 10

How to locate and edit your hosts file in Windows 10

In this tutorial, you will learn how to locate and edit your hosts file in…

How to Setup a Reverse Proxy with Apache Mod_Proxy?

A reverse proxy acts as a gateway between clients and backend servers, improving security, performance,…