{"id":13294,"date":"2024-06-21T09:32:59","date_gmt":"2024-06-21T09:32:59","guid":{"rendered":"https:\/\/www.bodhost.com\/kb\/?p=13294"},"modified":"2026-02-26T14:02:10","modified_gmt":"2026-02-26T14:02:10","slug":"how-to-zip-files-using-command-prompt","status":"publish","type":"post","link":"https:\/\/www.bodhost.com\/kb\/how-to-zip-files-using-command-prompt\/","title":{"rendered":"How to Zip Files Using Command Prompt"},"content":{"rendered":"<p>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.<\/p>\n<p>Here is a simple guide to zip files using the Command Prompt-<\/p>\n<ol>\n<li>Click the \u201cWin\u201d key to open the Start Menu.<\/li>\n<li>Type \u201cCommand Prompt\u201d in the search bar and click on \u201cRun as administrator\u201d on the right side.<\/li>\n<li>In the Command Prompt window, type the following command and press Enter (replace \u201cPlace\u201d with the location of your files)-\n<pre>cd Place<\/pre>\n<\/li>\n<li>Type \u201cdir\u201d and press Enter to list the files in the folder.<\/li>\n<li>To compress all files in the folder, type the below command and press Enter. Replace \u201cCompressed\u201d with the name you want for the zip file, and \u201cFileExt\u201d with the type of files you are compressing-\n<pre>tar -a -c -f Compressed.zip *.FileExt<\/pre>\n<\/li>\n<li>To compress a single file, type the subsequent command and press Enter. Replace \u201cCompressed\u201d with the name you want for the zip file, \u201cFileExt\u201d with the file\u2019s extension, and \u201cFileName\u201d with the name of the file-\n<pre>tar -a -c -f Compressed.zip FileName.FileExt<\/pre>\n<\/li>\n<\/ol>\n<p>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.<\/p>\n<p>You can also read about <a href=\"https:\/\/www.bodhost.com\/kb\/how-to-unzip-files-via-command-prompt\/\" target=\"_blank\" rel=\"noopener\"><strong>How to Unzip Files via Command Prompt<\/strong><\/a>. Unzipping files via the Command Prompt allows for quick and efficient file extraction without the need for additional software.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&hellip;<\/p>\n<p><a href=\"https:\/\/www.bodhost.com\/kb\/how-to-zip-files-using-command-prompt\/\" class=\"more-link\">Read More<\/a><\/p>\n","protected":false},"author":21,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[666],"tags":[1542],"class_list":["post-13294","post","type-post","status-publish","format-standard","hentry","category-general","tag-zip-files-using-command-prompt"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Zip Files Using Command Prompt - bodHOST<\/title>\n<meta name=\"description\" content=\"This guide explains how to zip files using the command prompt. You can zip files through Command Prompt using the tar command.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.bodhost.com\/kb\/how-to-zip-files-using-command-prompt\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Zip Files Using Command Prompt - bodHOST\" \/>\n<meta property=\"og:description\" content=\"This guide explains how to zip files using the command prompt. You can zip files through Command Prompt using the tar command.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.bodhost.com\/kb\/how-to-zip-files-using-command-prompt\/\" \/>\n<meta property=\"og:site_name\" content=\"Knowledge Base - bodHOST\" \/>\n<meta property=\"article:published_time\" content=\"2024-06-21T09:32:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-26T14:02:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2024\/06\/How-to-Zip-Files-Using-Command-Prompt-2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Serena\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2024\/06\/How-to-Zip-Files-Using-Command-Prompt-2.png\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Serena\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-zip-files-using-command-prompt\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-zip-files-using-command-prompt\\\/\"},\"author\":{\"name\":\"Serena\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/ffd3f118493c99471ae5bd4790a55830\"},\"headline\":\"How to Zip Files Using Command Prompt\",\"datePublished\":\"2024-06-21T09:32:59+00:00\",\"dateModified\":\"2026-02-26T14:02:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-zip-files-using-command-prompt\\\/\"},\"wordCount\":250,\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\"},\"keywords\":[\"Zip Files Using Command Prompt\"],\"articleSection\":[\"General Discussion\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-zip-files-using-command-prompt\\\/\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-zip-files-using-command-prompt\\\/\",\"name\":\"How to Zip Files Using Command Prompt - bodHOST\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#website\"},\"datePublished\":\"2024-06-21T09:32:59+00:00\",\"dateModified\":\"2026-02-26T14:02:10+00:00\",\"description\":\"This guide explains how to zip files using the command prompt. You can zip files through Command Prompt using the tar command.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-zip-files-using-command-prompt\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-zip-files-using-command-prompt\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-zip-files-using-command-prompt\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"General Discussion\",\"item\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/category\\\/general\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Zip Files Using Command Prompt\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/\",\"name\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\"},\"alternateName\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\",\"name\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Profile-Pic.png\",\"contentUrl\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Profile-Pic.png\",\"width\":240,\"height\":240,\"caption\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\"},\"image\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/ffd3f118493c99471ae5bd4790a55830\",\"name\":\"Serena\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g\",\"caption\":\"Serena\"},\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/author\\\/seema\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Zip Files Using Command Prompt - bodHOST","description":"This guide explains how to zip files using the command prompt. You can zip files through Command Prompt using the tar command.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.bodhost.com\/kb\/how-to-zip-files-using-command-prompt\/","og_locale":"en_US","og_type":"article","og_title":"How to Zip Files Using Command Prompt - bodHOST","og_description":"This guide explains how to zip files using the command prompt. You can zip files through Command Prompt using the tar command.","og_url":"https:\/\/www.bodhost.com\/kb\/how-to-zip-files-using-command-prompt\/","og_site_name":"Knowledge Base - bodHOST","article_published_time":"2024-06-21T09:32:59+00:00","article_modified_time":"2026-02-26T14:02:10+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2024\/06\/How-to-Zip-Files-Using-Command-Prompt-2.png","type":"image\/png"}],"author":"Serena","twitter_card":"summary_large_image","twitter_image":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2024\/06\/How-to-Zip-Files-Using-Command-Prompt-2.png","twitter_misc":{"Written by":"Serena","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.bodhost.com\/kb\/how-to-zip-files-using-command-prompt\/#article","isPartOf":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-zip-files-using-command-prompt\/"},"author":{"name":"Serena","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/person\/ffd3f118493c99471ae5bd4790a55830"},"headline":"How to Zip Files Using Command Prompt","datePublished":"2024-06-21T09:32:59+00:00","dateModified":"2026-02-26T14:02:10+00:00","mainEntityOfPage":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-zip-files-using-command-prompt\/"},"wordCount":250,"publisher":{"@id":"https:\/\/www.bodhost.com\/kb\/#organization"},"keywords":["Zip Files Using Command Prompt"],"articleSection":["General Discussion"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.bodhost.com\/kb\/how-to-zip-files-using-command-prompt\/","url":"https:\/\/www.bodhost.com\/kb\/how-to-zip-files-using-command-prompt\/","name":"How to Zip Files Using Command Prompt - bodHOST","isPartOf":{"@id":"https:\/\/www.bodhost.com\/kb\/#website"},"datePublished":"2024-06-21T09:32:59+00:00","dateModified":"2026-02-26T14:02:10+00:00","description":"This guide explains how to zip files using the command prompt. You can zip files through Command Prompt using the tar command.","breadcrumb":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-zip-files-using-command-prompt\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.bodhost.com\/kb\/how-to-zip-files-using-command-prompt\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.bodhost.com\/kb\/how-to-zip-files-using-command-prompt\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"General Discussion","item":"https:\/\/www.bodhost.com\/kb\/category\/general\/"},{"@type":"ListItem","position":2,"name":"How to Zip Files Using Command Prompt"}]},{"@type":"WebSite","@id":"https:\/\/www.bodhost.com\/kb\/#website","url":"https:\/\/www.bodhost.com\/kb\/","name":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","description":"","publisher":{"@id":"https:\/\/www.bodhost.com\/kb\/#organization"},"alternateName":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.bodhost.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.bodhost.com\/kb\/#organization","name":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","url":"https:\/\/www.bodhost.com\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/10\/Profile-Pic.png","contentUrl":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/10\/Profile-Pic.png","width":240,"height":240,"caption":"Web Hosting Knowledge Base | bodHOST Hosting FAQ"},"image":{"@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/person\/ffd3f118493c99471ae5bd4790a55830","name":"Serena","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g","caption":"Serena"},"url":"https:\/\/www.bodhost.com\/kb\/author\/seema\/"}]}},"_links":{"self":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/13294","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/comments?post=13294"}],"version-history":[{"count":3,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/13294\/revisions"}],"predecessor-version":[{"id":13297,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/13294\/revisions\/13297"}],"wp:attachment":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/media?parent=13294"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/categories?post=13294"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/tags?post=13294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}