{"id":5344,"date":"2023-07-18T06:15:00","date_gmt":"2023-07-18T04:15:00","guid":{"rendered":"https:\/\/expert-only.com\/?p=5344"},"modified":"2023-09-25T15:04:55","modified_gmt":"2023-09-25T13:04:55","slug":"delete-files-recursively-with-cmd","status":"publish","type":"post","link":"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/","title":{"rendered":"How to delete files and folders recursively with cmd?"},"content":{"rendered":"\n<h4 class=\"wp-block-heading has-text-align-left\"><strong><em>How to delete files recursively with the cmd command prompt in Windows?<\/em><\/strong><\/h4>\n\n\n\n<p>Tutorial on how to delete files recursively with cmd, i.e. from a folder and all its subfolders. Use the del batch command line and the recursive option. The Windows delete command provides this useful option automate the deletion process. For example, if you have a huge amount to delete but need to keep the folder and subfolder\u2019s structure.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 ez-toc-wrap-center counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/#advantages-of-recursivity-using-windows-cmd\" >Advantages of recursivity using Windows cmd<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/#batch-delete-files-in-subdirectories-in-command-prompt\" >Batch delete files in subdirectories in command prompt<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/#recursively-suppress-files-with-a-confirmation\" >Recursively suppress files with a confirmation<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/#delete-files-and-directories-without-confirmation\" >Delete files and directories without confirmation<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/#conclusion-and-safety-tips-for-batch-recursive-deletion\" >Conclusion and safety tips for batch recursive deletion<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"h-advantages-of-recursivity-using-windows-cmd\"><span class=\"ez-toc-section\" id=\"advantages-of-recursivity-using-windows-cmd\"><\/span>Advantages of recursivity using Windows cmd<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Indeed, it&#8217;s the main goal of this tutorial, to be effective and avoid browsing all the subfolders in order to search for a specific file name or extension. The main option that I suggest using is the deletion confirmation, this way you can control one last time which files are recursively deleted. Please note that the files deleted in recursive mode with the command line are not stored in the <a href=\"https:\/\/expert-only.net\/windows\/\">Windows <\/a>Recycle Bin. Here is below a list of a few advantages it offers:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Efficiency<\/strong>: It allows for <strong>quick deletion of multiple files and directories with a single command<\/strong>, eliminating the need to select each file or folder individually.<\/li>\n\n\n\n<li><strong>Precision<\/strong>: With the <strong>use of wildcards and specific file extensions<\/strong>, users can target they want to remove, ensuring that only the intended items are deleted without affecting others.<\/li>\n\n\n\n<li><strong>Depth<\/strong>: It can effortlessly reach and <strong>remove files nested deep within multiple subdirectories<\/strong>, which might be tedious through a graphical interface.<\/li>\n\n\n\n<li><strong>Scripting and Automation<\/strong>: For repetitive tasks, users can <strong>create batch scripts to delete specific sets of files<\/strong>, allowing for easy automation and scheduling of clean-up tasks.<\/li>\n\n\n\n<li><strong>Resource Light<\/strong>: Using <strong>cmd is less resource-intensive than graphical interfaces<\/strong>, ensuring smoother system performance, especially when dealing with a large number of files.<\/li>\n\n\n\n<li><strong>Flexibility<\/strong>: Advanced users can combine file deletion with other command-line operations, achieving complex file management tasks seamlessly.<\/li>\n<\/ol>\n\n\n\n<p class=\"has-text-align-center\"><strong><mark style=\"background-color:#fcb900\" class=\"has-inline-color has-black-color\">Make sure you delete the proper files only. The operation is irreversible.<\/mark><\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"delete-files-in-a-recursive-way-from-all-subfolders\"><span class=\"ez-toc-section\" id=\"batch-delete-files-in-subdirectories-in-command-prompt\"><\/span>Batch delete files in subdirectories in command prompt<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>To <a href=\"https:\/\/expert-only.com\/en\/ms-dos\/delete-a-file-in-windows-cmd\/\">delete files<\/a> recursively using the explicit path, without any confirmation prompt, use this command:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bat\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">del \/s \"C:\\Folder\\\"<\/pre>\n\n\n\n<p>You can also use this variation, without the quotes and without any confirmation prompt. The quotes are mandatory when the complete path of the folder, or the file, contains spaces.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bat\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">del \/s C:\\Folder\\<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"delete-all-files-inside-a-folder-recursively-with-a-confirmation-prompt\"><span class=\"ez-toc-section\" id=\"recursively-suppress-files-with-a-confirmation\"><\/span>Recursively suppress files with a confirmation<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>This option is the one I recommend. Indeed, make sure to double check and confirm before all files are deleted. Please note that this option deletes only the text files as we use the *.txt filter.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bat\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">del \/p \/s SubFolder_1\\*.txt<\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"982\" height=\"612\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/ms-dos-cmd_tree-delete-files-recursively-with-prompt_en.png\" alt=\"Delete files recursively with cmd with a prompt confirmation in Windows 10\" class=\"wp-image-5354\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/ms-dos-cmd_tree-delete-files-recursively-with-prompt_en.png 982w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/ms-dos-cmd_tree-delete-files-recursively-with-prompt_en-300x187.png 300w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/ms-dos-cmd_tree-delete-files-recursively-with-prompt_en-768x479.png 768w\" sizes=\"auto, (max-width: 982px) 100vw, 982px\" \/><figcaption class=\"wp-element-caption\"><em>Delete files recursively with cmd using a prompt confirmation<\/em><\/figcaption><\/figure><\/div>\n\n\n<p>Then a prompt is displayed for the files that match, in alphabetical order:<br><em>c:\\Folder\\SubFolder_1\\file (1).txt, Delete (Y\/N)?<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"delete-files-recursively-without-confirmation\"><span class=\"ez-toc-section\" id=\"delete-files-and-directories-without-confirmation\"><\/span>Delete files and directories without confirmation<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>To force the deletion with no prompt at all use the delete quiet mode. Useful with a lot of files.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bat\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">del \/q \/s SubFolder_2\\*.txt<\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"982\" height=\"612\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/ms-dos-cmd_tree-delete-files-recursively-quiet-mode_en.png\" alt=\"Delete files recursively with cmd, i.e., from folder and subfolders in quiet mode without confirmation\" class=\"wp-image-5347\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/ms-dos-cmd_tree-delete-files-recursively-quiet-mode_en.png 982w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/ms-dos-cmd_tree-delete-files-recursively-quiet-mode_en-300x187.png 300w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/ms-dos-cmd_tree-delete-files-recursively-quiet-mode_en-768x479.png 768w\" sizes=\"auto, (max-width: 982px) 100vw, 982px\" \/><figcaption class=\"wp-element-caption\"><em>Delete files recursively with cmd in quiet mode without confirmation<\/em><\/figcaption><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"h-conclusion-and-safety-tips-for-batch-recursive-deletion\"><span class=\"ez-toc-section\" id=\"conclusion-and-safety-tips-for-batch-recursive-deletion\"><\/span>Conclusion and safety tips for batch recursive deletion<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"has-text-align-left\">To conclude, the <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows-server\/administration\/windows-commands\/del\" target=\"_blank\" rel=\"noreferrer noopener\">del<\/a> \/s recursive option is the fastest and easiest way to delete files recursively with cmd in Windows. Using cmd for recursive file deletion is powerful, but it requires caution. Always double-check paths and file filters to target the correct items. Since files deleted via cmd bypass the Windows Recycle Bin, ensure you have backups of essential data.<\/p>\n\n\n\n<p class=\"has-text-align-left\">When in doubt, use the confirmation prompt (<code>\/p<\/code> option) to verify each file&#8217;s deletion. Always prioritize data security when harnessing the command line&#8217;s efficiency. Here is <a href=\"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/\">how to copy recursively files and folders using the xcopy command<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-embed aligncenter is-type-wp-embed is-provider-sql-and-it-tutorials wp-block-embed-sql-and-it-tutorials\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"W1mJUo697H\"><a href=\"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/\">How to copy files recursively using Windows cmd?<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;How to copy files recursively using Windows cmd?&#8221; &#8212; SQL and IT Tutorials\" src=\"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/embed\/#?secret=TTcI9QH9CV#?secret=W1mJUo697H\" data-secret=\"W1mJUo697H\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>How to delete files recursively with the cmd command prompt in Windows? Tutorial on how to delete files recursively with cmd, i.e. from a folder and all its subfolders. Use the del batch command line and the recursive option. <a class=\"mh-excerpt-more\" href=\"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/\" title=\"How to delete files and folders recursively with cmd?\">&#8230;<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":5537,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[410],"tags":[],"class_list":{"0":"post-5344","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-ms-dos"},"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>How to delete files and folders recursively with cmd? MS-DOS<\/title>\n<meta name=\"description\" content=\"To delete files recursively with cmd commands in Windows, i.e., from a folder and its subfolders, use a del script with the recursive option.\" \/>\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\/delete-files-recursively-with-cmd\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to delete files and folders recursively with cmd?\" \/>\n<meta property=\"og:description\" content=\"To delete files recursively with cmd commands in Windows, i.e., from a folder and its subfolders, use a del script with the recursive option.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/\" \/>\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=\"2023-07-18T04:15:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-25T13:04:55+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/return-1825515_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=\"3 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\/delete-files-recursively-with-cmd\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/\"},\"author\":{\"name\":\"Expert-Only\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef\"},\"headline\":\"How to delete files and folders recursively with cmd?\",\"datePublished\":\"2023-07-18T04:15:00+00:00\",\"dateModified\":\"2023-09-25T13:04:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/\"},\"wordCount\":598,\"publisher\":{\"@id\":\"https:\/\/expert-only.com\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/return-1825515_1920.jpg\",\"articleSection\":[\"MS-DOS\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/\",\"url\":\"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/\",\"name\":\"How to delete files and folders recursively with cmd? MS-DOS\",\"isPartOf\":{\"@id\":\"https:\/\/expert-only.com\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/return-1825515_1920.jpg\",\"datePublished\":\"2023-07-18T04:15:00+00:00\",\"dateModified\":\"2023-09-25T13:04:55+00:00\",\"description\":\"To delete files recursively with cmd commands in Windows, i.e., from a folder and its subfolders, use a del script with the recursive option.\",\"breadcrumb\":{\"@id\":\"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/#primaryimage\",\"url\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/return-1825515_1920.jpg\",\"contentUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/return-1825515_1920.jpg\",\"width\":1920,\"height\":1080},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"en\",\"item\":\"https:\/\/expert-only.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to delete files and folders recursively with cmd?\"}]},{\"@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":"How to delete files and folders recursively with cmd? MS-DOS","description":"To delete files recursively with cmd commands in Windows, i.e., from a folder and its subfolders, use a del script with the recursive option.","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\/delete-files-recursively-with-cmd\/","og_locale":"en_US","og_type":"article","og_title":"How to delete files and folders recursively with cmd?","og_description":"To delete files recursively with cmd commands in Windows, i.e., from a folder and its subfolders, use a del script with the recursive option.","og_url":"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/","og_site_name":"SQL and IT Tutorials","article_publisher":"https:\/\/www.facebook.com\/ExpertOnlyCom\/","article_published_time":"2023-07-18T04:15:00+00:00","article_modified_time":"2023-09-25T13:04:55+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/return-1825515_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":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/#article","isPartOf":{"@id":"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/"},"author":{"name":"Expert-Only","@id":"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef"},"headline":"How to delete files and folders recursively with cmd?","datePublished":"2023-07-18T04:15:00+00:00","dateModified":"2023-09-25T13:04:55+00:00","mainEntityOfPage":{"@id":"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/"},"wordCount":598,"publisher":{"@id":"https:\/\/expert-only.com\/en\/#organization"},"image":{"@id":"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/#primaryimage"},"thumbnailUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/return-1825515_1920.jpg","articleSection":["MS-DOS"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/","url":"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/","name":"How to delete files and folders recursively with cmd? MS-DOS","isPartOf":{"@id":"https:\/\/expert-only.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/#primaryimage"},"image":{"@id":"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/#primaryimage"},"thumbnailUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/return-1825515_1920.jpg","datePublished":"2023-07-18T04:15:00+00:00","dateModified":"2023-09-25T13:04:55+00:00","description":"To delete files recursively with cmd commands in Windows, i.e., from a folder and its subfolders, use a del script with the recursive option.","breadcrumb":{"@id":"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/#primaryimage","url":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/return-1825515_1920.jpg","contentUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/02\/return-1825515_1920.jpg","width":1920,"height":1080},{"@type":"BreadcrumbList","@id":"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"en","item":"https:\/\/expert-only.com\/en\/"},{"@type":"ListItem","position":2,"name":"How to delete files and folders recursively with cmd?"}]},{"@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\/5344","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=5344"}],"version-history":[{"count":4,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts\/5344\/revisions"}],"predecessor-version":[{"id":27064,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts\/5344\/revisions\/27064"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/media\/5537"}],"wp:attachment":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/media?parent=5344"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/categories?post=5344"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/tags?post=5344"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}