{"id":5382,"date":"2022-02-02T06:38:00","date_gmt":"2022-02-02T05:38:00","guid":{"rendered":"https:\/\/expert-only.com\/?p=5382"},"modified":"2022-03-29T13:31:49","modified_gmt":"2022-03-29T11:31:49","slug":"clear-the-command-line-screen-prompt","status":"publish","type":"post","link":"https:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/","title":{"rendered":"Clear the command line screen prompt"},"content":{"rendered":"\n<p><strong>How to clear the Windows command line screen prompt ? MS-DOS allows to manage the Windows system in a very effective way, for example by using scripting to automate tasks. After running multiple commands on the black dos screen, it is very convenient to clear the old messages. <\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-clear-the-windows-command-line-screen-prompt-use-the-cls-command\">How to clear the Windows command line screen prompt ? Use the cls command.<\/h2>\n\n\n\n<p>The <strong><a href=\"https:\/\/en.wikipedia.org\/wiki\/CLS_(command)\" target=\"_blank\" rel=\"noreferrer noopener\">cls<\/a> <\/strong>command stands for <strong>CL<\/strong>ear <strong>S<\/strong>creenline in Windows. It cleans the screen from the previous commands results. It is a very useful batch to have a much clearer vision on your command-line work. The result is an empty command prompt window.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"980\" height=\"508\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/dos-command-line-cls-clear-prompt_en.png\" alt=\"cls command to clear the command prompt\" class=\"wp-image-5372\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/dos-command-line-cls-clear-prompt_en.png 980w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/dos-command-line-cls-clear-prompt_en-300x156.png 300w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/dos-command-line-cls-clear-prompt_en-768x398.png 768w\" sizes=\"auto, (max-width: 980px) 100vw, 980px\" \/><figcaption>cls command to clear the command prompt<\/figcaption><\/figure><\/div>\n\n\n\n<p><strong>So simply run the cls command in your ms-dos prompt to empty the screen.<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">REM the following command clears the current windows batch\n\ncls<\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"980\" height=\"508\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/dos-command-line-cls-result-empty-prompt_en.png\" alt=\"after cls executin the command line prompt is empty\" class=\"wp-image-5377\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/dos-command-line-cls-result-empty-prompt_en.png 980w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/dos-command-line-cls-result-empty-prompt_en-300x156.png 300w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/dos-command-line-cls-result-empty-prompt_en-768x398.png 768w\" sizes=\"auto, (max-width: 980px) 100vw, 980px\" \/><figcaption>after cls executin the command line prompt is empty<\/figcaption><\/figure><\/div>\n\n\n\n<p>To go further, let&#8217;s check <strong><a href=\"https:\/\/expert-only.com\/en\/ms-dos\/copy-recursively-files-and-folders-in-cmd-with-xcopy\/\">how to copy recursively multiple files and folders with Windows command line<\/a><\/strong>. <\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>How to clear the Windows command line screen prompt ? MS-DOS allows to manage the Windows system in a very effective way, for example by using scripting to automate tasks. After running multiple commands on the black dos screen, <a class=\"mh-excerpt-more\" href=\"https:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/\" title=\"Clear the command line screen prompt\">&#8230;<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":5532,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[410],"tags":[412,418],"class_list":{"0":"post-5382","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-ms-dos","8":"tag-batch","9":"tag-folder"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.7 (Yoast SEO v26.2) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Clear the command line screen prompt - MS-DOS<\/title>\n<meta name=\"description\" content=\"How to clear the Windows command line screen prompt ? The cls command line in Windows cleans the screen from all previous commands results.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Clear the command line screen prompt\" \/>\n<meta property=\"og:description\" content=\"How to clear the Windows command line screen prompt ? The cls command line in Windows cleans the screen from all previous commands results.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/\" \/>\n<meta property=\"og:site_name\" content=\"SQL and IT Tutorials\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ExpertOnlyCom\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-02-02T05:38:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-03-29T11:31:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/technology-1283624_1920.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Expert-Only\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@expert_only\" \/>\n<meta name=\"twitter:site\" content=\"@expert_only\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Expert-Only\" \/>\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:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/\"},\"author\":{\"name\":\"Expert-Only\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef\"},\"headline\":\"Clear the command line screen prompt\",\"datePublished\":\"2022-02-02T05:38:00+00:00\",\"dateModified\":\"2022-03-29T11:31:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/\"},\"wordCount\":156,\"publisher\":{\"@id\":\"https:\/\/expert-only.com\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/technology-1283624_1920.jpg\",\"keywords\":[\"Batch\",\"Folder\"],\"articleSection\":[\"MS-DOS\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/\",\"url\":\"https:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/\",\"name\":\"Clear the command line screen prompt - MS-DOS\",\"isPartOf\":{\"@id\":\"https:\/\/expert-only.com\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/technology-1283624_1920.jpg\",\"datePublished\":\"2022-02-02T05:38:00+00:00\",\"dateModified\":\"2022-03-29T11:31:49+00:00\",\"description\":\"How to clear the Windows command line screen prompt ? The cls command line in Windows cleans the screen from all previous commands results.\",\"breadcrumb\":{\"@id\":\"https:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/#primaryimage\",\"url\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/technology-1283624_1920.jpg\",\"contentUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/technology-1283624_1920.jpg\",\"width\":1920,\"height\":1080},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"en\",\"item\":\"https:\/\/expert-only.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Clear the command line screen prompt\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/expert-only.com\/en\/#website\",\"url\":\"https:\/\/expert-only.com\/en\/\",\"name\":\"SQL and IT Tutorials\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/expert-only.com\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/expert-only.com\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/expert-only.com\/en\/#organization\",\"name\":\"Expert-Only\",\"url\":\"https:\/\/expert-only.com\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg\",\"contentUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg\",\"width\":381,\"height\":174,\"caption\":\"Expert-Only\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/ExpertOnlyCom\/\",\"https:\/\/x.com\/expert_only\",\"https:\/\/www.youtube.com\/channel\/UCMS5sR_FwAetB0FmciNvUaA\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef\",\"name\":\"Expert-Only\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g\",\"caption\":\"Expert-Only\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Clear the command line screen prompt - MS-DOS","description":"How to clear the Windows command line screen prompt ? The cls command line in Windows cleans the screen from all previous commands results.","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:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/","og_locale":"en_US","og_type":"article","og_title":"Clear the command line screen prompt","og_description":"How to clear the Windows command line screen prompt ? The cls command line in Windows cleans the screen from all previous commands results.","og_url":"https:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/","og_site_name":"SQL and IT Tutorials","article_publisher":"https:\/\/www.facebook.com\/ExpertOnlyCom\/","article_published_time":"2022-02-02T05:38:00+00:00","article_modified_time":"2022-03-29T11:31:49+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/technology-1283624_1920.jpg","type":"image\/jpeg"}],"author":"Expert-Only","twitter_card":"summary_large_image","twitter_creator":"@expert_only","twitter_site":"@expert_only","twitter_misc":{"Written by":"Expert-Only","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/#article","isPartOf":{"@id":"https:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/"},"author":{"name":"Expert-Only","@id":"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef"},"headline":"Clear the command line screen prompt","datePublished":"2022-02-02T05:38:00+00:00","dateModified":"2022-03-29T11:31:49+00:00","mainEntityOfPage":{"@id":"https:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/"},"wordCount":156,"publisher":{"@id":"https:\/\/expert-only.com\/en\/#organization"},"image":{"@id":"https:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/#primaryimage"},"thumbnailUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/technology-1283624_1920.jpg","keywords":["Batch","Folder"],"articleSection":["MS-DOS"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/","url":"https:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/","name":"Clear the command line screen prompt - MS-DOS","isPartOf":{"@id":"https:\/\/expert-only.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/#primaryimage"},"image":{"@id":"https:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/#primaryimage"},"thumbnailUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/technology-1283624_1920.jpg","datePublished":"2022-02-02T05:38:00+00:00","dateModified":"2022-03-29T11:31:49+00:00","description":"How to clear the Windows command line screen prompt ? The cls command line in Windows cleans the screen from all previous commands results.","breadcrumb":{"@id":"https:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/#primaryimage","url":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/technology-1283624_1920.jpg","contentUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/technology-1283624_1920.jpg","width":1920,"height":1080},{"@type":"BreadcrumbList","@id":"https:\/\/expert-only.com\/en\/ms-dos\/clear-the-command-line-screen-prompt\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"en","item":"https:\/\/expert-only.com\/en\/"},{"@type":"ListItem","position":2,"name":"Clear the command line screen prompt"}]},{"@type":"WebSite","@id":"https:\/\/expert-only.com\/en\/#website","url":"https:\/\/expert-only.com\/en\/","name":"SQL and IT Tutorials","description":"","publisher":{"@id":"https:\/\/expert-only.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/expert-only.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/expert-only.com\/en\/#organization","name":"Expert-Only","url":"https:\/\/expert-only.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg","contentUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2017\/09\/cropped-logo_Expert-Only.jpg","width":381,"height":174,"caption":"Expert-Only"},"image":{"@id":"https:\/\/expert-only.com\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/ExpertOnlyCom\/","https:\/\/x.com\/expert_only","https:\/\/www.youtube.com\/channel\/UCMS5sR_FwAetB0FmciNvUaA"]},{"@type":"Person","@id":"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef","name":"Expert-Only","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/expert-only.com\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/084b15660763ff5b13bb60b2f52f97bb?s=96&d=identicon&r=g","caption":"Expert-Only"}}]}},"_links":{"self":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts\/5382","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/comments?post=5382"}],"version-history":[{"count":0,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts\/5382\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/media\/5532"}],"wp:attachment":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/media?parent=5382"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/categories?post=5382"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/tags?post=5382"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}