{"id":97366,"date":"2023-08-02T06:00:30","date_gmt":"2023-08-02T10:00:30","guid":{"rendered":"https:\/\/pureinfotech.com\/?p=97366"},"modified":"2023-08-02T07:21:03","modified_gmt":"2023-08-02T11:21:03","slug":"exclude-files-folders-robocopy-windows-10","status":"publish","type":"post","link":"https:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/","title":{"rendered":"How to exclude files and folders copy using Robocopy on Windows 11, 10"},"content":{"rendered":"<p><strong>UPDATED 8\/2\/2023:<\/strong> On <a href=\"https:\/\/pureinfotech.com\/tag\/windows-11\/\">Windows 11<\/a> (or 10), Robocopy (Robust File Copy) is a powerful file management command-line tool with many options to <a href=\"https:\/\/pureinfotech.com\/robocopy-multithreaded-file-copy-windows-10\/\">transfer files and folders to another location faster and more reliably<\/a> than File Explorer.<\/p>\n<p>However, by default, Robocopy transfers everything on a given path, which may not be ideal in every scenario as you may have specific files and folders in a location you don&#8217;t want to copy. However, the tool includes at least two options, which you can use to exclude files and folders from the copy process.<\/p>\n<p>In this <a href=\"https:\/\/pureinfotech.com\/tag\/how-to\/\">guide<\/a>, you will learn how to copy data using Robocopy on <a href=\"https:\/\/pureinfotech.com\/tag\/windows-10\">Windows 10<\/a> (or Windows 11), excluding those files and folders you don&#8217;t need to transfer.<\/p>\n<ul class=\"toc\">\n<li><a href=\"#exclude_folder_robocopy\">Exclude folder from Robocopy<\/a><\/li>\n<li><a href=\"#exclude_file_robocopy\">Exclude file from Robocopy<\/a><\/li>\n<li><a href=\"#exclude_folder_file_robocopy\">Exclude files and folders from Robocopy<\/a><\/li>\n<\/ul>\n<h2 id=\"exclude_folder_robocopy\">Exclude folder from Robocopy<\/h2>\n<p>To exclude a folder while copying with Robocopy, use these steps:<\/p>\n<ol>\n<li>\n<p>Open <strong>Start<\/strong> on Windows 11.<\/p>\n<\/li>\n<li>\n<p>Search for <strong>Command Prompt<\/strong>, right-click the result, and select the <strong>Run as administrator <\/strong>option.<\/p>\n<\/li>\n<li>\n<p>Type the following command to copy the files and folders, excluding a specific folder, to another location and press <strong>Enter<\/strong>:<\/p>\n<pre>robocopy C:\\source\\folder\\path\\ D:\\destination\\folder\\path\\ \/E \/Z \/ZB \/R:5 \/W:5 \/TBD \/NP \/V <strong>\/XD \"C:\\source\\folder\\path\\to\\exclude-folder\"<\/strong><\/pre>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-150526\" src=\"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/02\/robocopy-exclude-folder-windows-11.webp?resize=827%2C479&#038;quality=78&#038;strip=all&#038;ssl=1\" alt=\"Robocopy exclude folder command\" width=\"827\" height=\"479\" srcset=\"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/02\/robocopy-exclude-folder-windows-11.webp?w=992&amp;quality=78&amp;strip=all&amp;ssl=1 992w, https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/02\/robocopy-exclude-folder-windows-11.webp?resize=300%2C174&amp;quality=78&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/02\/robocopy-exclude-folder-windows-11.webp?resize=990%2C574&amp;quality=78&amp;strip=all&amp;ssl=1 990w, https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/02\/robocopy-exclude-folder-windows-11.webp?resize=150%2C87&amp;quality=78&amp;strip=all&amp;ssl=1 150w\" sizes=\"auto, (max-width: 827px) 100vw, 827px\" \/><\/p>\n<p>This example excludes a specific folder using Robocopy:<\/p>\n<pre>robocopy C:\\source\\folder\\path\\ D:\\destination\\folder\\path\\ \/E \/Z \/ZB \/R:5 \/W:5 \/TBD \/NP \/V <strong>\/XD exclude-folder-1<\/strong><\/pre>\n<p>This example excludes a folder using the Robocopy wildcard option:<\/p>\n<pre>robocopy C:\\source\\folder\\path\\ D:\\destination\\folder\\path\\ \/E \/Z \/ZB \/R:5 \/W:5 \/TBD \/NP \/V <strong>\/XD exclude-fold*<\/strong><\/pre>\n<p>This example excludes multiple folders using Robocopy:<\/p>\n<pre>robocopy C:\\source\\folder\\path\\ D:\\destination\\folder\\path\\ \/E \/Z \/ZB \/R:5 \/W:5 \/TBD \/NP \/V <strong>\/XD \"C:\\source\\folder\\path\\to\\exclude-folder-1\" \"C:\\source\\folder\\path\\to\\exclude-folder-2\"<\/strong><\/pre>\n<\/li>\n<\/ol>\n<p>Once you complete the steps, the data will copy to the destination, except the folders specified in the command (exclude_folder_file_robocopy) will be excluded.<\/p>\n<h2 id=\"exclude_file_robocopy\">Exclude file from Robocopy<\/h2>\n<p>To exclude a file while copying with Robocopy, use these steps:<\/p>\n<ol>\n<li>\n<p>Open <strong>Start<\/strong>.<\/p>\n<\/li>\n<li>\n<p>Search for <strong>Command Prompt<\/strong>, right-click the result, and select the <strong>Run as administrator <\/strong>option.<\/p>\n<\/li>\n<li>\n<p>Type the following command to copy the files and folders, excluding a specific file, to another location and press <strong>Enter<\/strong>:<\/p>\n<pre>robocopy C:\\source\\folder\\path\\ D:\\destination\\folder\\path\\ \/E \/Z \/ZB \/R:5 \/W:5 \/TBD \/NP \/V <strong>\/XF \"C:\\source\\folder\\path\\to\\folder\\filename.extension\"<\/strong><\/pre>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-150528\" src=\"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/02\/robocopy-exclude-file-windows-11.webp?resize=827%2C479&#038;quality=78&#038;strip=all&#038;ssl=1\" alt=\"Robocopy exclude file command\" width=\"827\" height=\"479\" srcset=\"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/02\/robocopy-exclude-file-windows-11.webp?w=992&amp;quality=78&amp;strip=all&amp;ssl=1 992w, https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/02\/robocopy-exclude-file-windows-11.webp?resize=300%2C174&amp;quality=78&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/02\/robocopy-exclude-file-windows-11.webp?resize=990%2C574&amp;quality=78&amp;strip=all&amp;ssl=1 990w, https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/02\/robocopy-exclude-file-windows-11.webp?resize=150%2C87&amp;quality=78&amp;strip=all&amp;ssl=1 150w\" sizes=\"auto, (max-width: 827px) 100vw, 827px\" \/><\/p>\n<p>This example excludes a file using Robocopy:<\/p>\n<pre>robocopy C:\\source\\folder\\path\\ D:\\destination\\folder\\path\\ \/E \/Z \/ZB \/R:5 \/W:5 \/TBD \/NP \/V <b>\/XF filename-1.extension<\/b><\/pre>\n<p>This example excludes a file using the Robocopy wildcard option:<\/p>\n<pre>robocopy C:\\source\\folder\\path\\ D:\\destination\\folder\\path\\ \/E \/Z \/ZB \/R:5 \/W:5 \/TBD \/NP \/V <b>\/XF filena*<\/b><\/pre>\n<p>This example excludes multiple files using the Robocopy option:<\/p>\n<pre>robocopy C:\\source\\folder\\path\\ D:\\destination\\folder\\path\\ \/E \/Z \/ZB \/R:5 \/W:5 \/TBD \/NP \/V <b>\/XF \"C:\\source\\folder\\path\\to\\folder\\filename-1.extension\" \"C:\\source\\folder\\path\\to\\folder\\filename-2.extension<\/b><\/pre>\n<\/li>\n<\/ol>\n<p>After you complete the steps, Robocopy will copy all the files and folders from a particular location, excluding the files you specified in the command, using the <strong>&#8220;\/XF&#8221;<\/strong> switch.<\/p>\n<h2 id=\"exclude_folder_file_robocopy\">Exclude files and folders from Robocopy<\/h2>\n<p>To exclude a file and folder using Robocopy, use these steps:<\/p>\n<ol>\n<li>\n<p>Open <strong>Start<\/strong>.<\/p>\n<\/li>\n<li>\n<p>Search for <strong>Command Prompt<\/strong>, right-click the result, and select the <strong>Run as administrator <\/strong>option.<\/p>\n<\/li>\n<li>\n<p>Type the following command to copy the files and folders, excluding specific files and folders, to another drive and press <strong>Enter<\/strong>:<\/p>\n<pre>robocopy C:\\source\\folder\\path\\ D:\\destination\\folder\\path\\ \/E \/Z \/ZB \/R:5 \/W:5 \/TBD \/NP \/V <strong>\/XD \"C:\\source\\folder\\path\\to\\exclude-folder\" \/XF \"C:\\source\\folder\\path\\to\\folder\\filename.extension\"<\/strong><\/pre>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-150527\" src=\"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/02\/robocopy-exclude-folder-file-command.webp?resize=827%2C491&#038;quality=78&#038;strip=all&#038;ssl=1\" alt=\"Robocopy exclude folder and file command\" width=\"827\" height=\"491\" srcset=\"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/02\/robocopy-exclude-folder-file-command.webp?w=1001&amp;quality=78&amp;strip=all&amp;ssl=1 1001w, https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/02\/robocopy-exclude-folder-file-command.webp?resize=300%2C178&amp;quality=78&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/02\/robocopy-exclude-folder-file-command.webp?resize=967%2C574&amp;quality=78&amp;strip=all&amp;ssl=1 967w, https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/02\/robocopy-exclude-folder-file-command.webp?resize=150%2C89&amp;quality=78&amp;strip=all&amp;ssl=1 150w\" sizes=\"auto, (max-width: 827px) 100vw, 827px\" \/><\/li>\n<\/ol>\n<p>Once you complete the steps, all the content will copy to the new location except those files and folders you excluded in the command using the <strong>&#8220;\/XD&#8221;<\/strong> and <strong>&#8220;\/XF&#8221;<\/strong> switches.<\/p>\n<h3>Robocopy command switches<\/h3>\n<p>Robocopy has a lot of options, and in the command shown in this guide, we&#8217;re using the following switches to copy data, excluding specific files and folders.<\/p>\n<ul>\n<li><strong>\/E &#8212;<\/strong>\u00a0Copy Subdirectories, including empty ones.<\/li>\n<li><strong>\/Z &#8212;<\/strong>\u00a0Copy files in restartable mode.<\/li>\n<li><strong>\/ZB &#8212;<\/strong> Uses restartable mode. If access is denied, use backup mode.<\/li>\n<li><strong>\/R:5 &#8212;<\/strong> Retry 5 times (you can specify a different number. The default is 1 million).<\/li>\n<li><strong>\/W:5 &#8212;<\/strong> Wait 5 seconds before retrying (you can select a different number. The default is 30 seconds).<\/li>\n<li><strong>\/TBD &#8212;<\/strong> Wait for share names To Be Defined (retry error 67).<\/li>\n<li><strong>\/NP &#8212;<\/strong> No Progress \u2013 don&#8217;t display percentage copied.<\/li>\n<li><strong>\/V &#8212;<\/strong>\u00a0Produce verbose output, showing skipped files.<\/li>\n<li><strong>\/XD &#8212;<\/strong> Excludes folders matching the path and folder name.<\/li>\n<li><strong>\/XF &#8212;<\/strong> Excludes files matching the location and file name.<\/li>\n<\/ul>\n<p>The most important switches in this command are the <strong>&#8220;\/XD,&#8221; <\/strong>which allows you to exclude folders, and <strong>&#8220;\/XF,&#8221;<\/strong> which you can use to exclude files. The other options are optional, but you should use these options in any standard copy process using Robocopy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here are the steps to exclude one or more files and folders during a copy process using the Robocopy command-line tool on Windows 11. <\/p>\n","protected":false},"author":2,"featured_media":150525,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"footnotes":""},"categories":[2426,23],"tags":[97,19,2540,2715,2576],"class_list":["post-97366","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-features","category-windows","tag-difficulty-level-advanced","tag-how-to","tag-windows-10","tag-windows-11","tag-windows-help"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to exclude files and folders copy using Robocopy on Windows 11, 10 - Pureinfotech<\/title>\n<meta name=\"description\" content=\"To exclude folder with robocopy on Windows 11 or 10, open Command Prompt (admin) and use &quot;XD&quot; or &quot;XF&quot; options with the robocopy 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:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to exclude files and folders copy using Robocopy on Windows 11, 10 - Pureinfotech\" \/>\n<meta property=\"og:description\" content=\"To exclude folder with robocopy on Windows 11 or 10, open Command Prompt (admin) and use &quot;XD&quot; or &quot;XF&quot; options with the robocopy command.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/\" \/>\n<meta property=\"og:site_name\" content=\"Pureinfotech \u2022 Windows 10 &amp; Windows 11 help for humans\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/pureinfotech\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-02T10:00:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-02T11:21:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/pureinfotech.com\/wp-content\/uploads\/2022\/02\/windows-11-robocopy-exclude-command-hero.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1680\" \/>\n\t<meta property=\"og:image:height\" content=\"1050\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Mauro Huculak\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@Pureinfotech\" \/>\n<meta name=\"twitter:site\" content=\"@Pureinfotech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mauro Huculak\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/\"},\"author\":{\"name\":\"Mauro Huculak\",\"@id\":\"https:\/\/pureinfotech.com\/#\/schema\/person\/bf4921a81eb4380865af70691a93af43\"},\"headline\":\"How to exclude files and folders copy using Robocopy on Windows 11, 10\",\"datePublished\":\"2023-08-02T10:00:30+00:00\",\"dateModified\":\"2023-08-02T11:21:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/\"},\"wordCount\":613,\"publisher\":{\"@id\":\"https:\/\/pureinfotech.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/02\/windows-11-robocopy-exclude-command-hero.webp?fit=1680%2C1050&quality=78&strip=all&ssl=1\",\"keywords\":[\"Difficulty level: Advanced\",\"How-To\",\"Windows 10\",\"Windows 11\",\"Windows Help\"],\"articleSection\":[\"Features\",\"Windows\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/\",\"url\":\"https:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/\",\"name\":\"How to exclude files and folders copy using Robocopy on Windows 11, 10 - Pureinfotech\",\"isPartOf\":{\"@id\":\"https:\/\/pureinfotech.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/02\/windows-11-robocopy-exclude-command-hero.webp?fit=1680%2C1050&quality=78&strip=all&ssl=1\",\"datePublished\":\"2023-08-02T10:00:30+00:00\",\"dateModified\":\"2023-08-02T11:21:03+00:00\",\"description\":\"To exclude folder with robocopy on Windows 11 or 10, open Command Prompt (admin) and use \\\"XD\\\" or \\\"XF\\\" options with the robocopy command.\",\"breadcrumb\":{\"@id\":\"https:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/02\/windows-11-robocopy-exclude-command-hero.webp?fit=1680%2C1050&quality=78&strip=all&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/02\/windows-11-robocopy-exclude-command-hero.webp?fit=1680%2C1050&quality=78&strip=all&ssl=1\",\"width\":1680,\"height\":1050,\"caption\":\"Robocopy exclude files and folders command\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/pureinfotech.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to exclude files and folders copy using Robocopy on Windows 11, 10\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/pureinfotech.com\/#website\",\"url\":\"https:\/\/pureinfotech.com\/\",\"name\":\"Pureinfotech \u2022 Windows 10 &amp; Windows 11 help for humans\",\"description\":\"Pureinfotech is the best site to get Windows help \u2013 featuring friendly how-to guides on Windows 10, Windows 11, Xbox, and other things tech, news, deals, reviews, and more.\",\"publisher\":{\"@id\":\"https:\/\/pureinfotech.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/pureinfotech.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/pureinfotech.com\/#organization\",\"name\":\"Pureinfotech\",\"url\":\"https:\/\/pureinfotech.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/pureinfotech.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2019\/05\/pure-logo-v45.png?fit=192%2C192&quality=78&strip=all&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2019\/05\/pure-logo-v45.png?fit=192%2C192&quality=78&strip=all&ssl=1\",\"width\":192,\"height\":192,\"caption\":\"Pureinfotech\"},\"image\":{\"@id\":\"https:\/\/pureinfotech.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/facebook.com\/pureinfotech\",\"https:\/\/x.com\/Pureinfotech\",\"https:\/\/www.youtube.com\/user\/Pureinfotech\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/pureinfotech.com\/#\/schema\/person\/bf4921a81eb4380865af70691a93af43\",\"name\":\"Mauro Huculak\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/1cbac450402490f703560c52c3114f3e5ab02a741684eb73917885ae4a117a16?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1cbac450402490f703560c52c3114f3e5ab02a741684eb73917885ae4a117a16?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1cbac450402490f703560c52c3114f3e5ab02a741684eb73917885ae4a117a16?s=96&d=mm&r=g\",\"caption\":\"Mauro Huculak\"},\"description\":\"Mauro Huculak is a Windows How-To Expert and founder of Pureinfotech (est. 2010). With over 21 years as a technology writer and IT Specialist, Mauro specializes in Windows, software, and cross-platform systems such as Linux, Android, and macOS. Certifications he holds include Microsoft Certified Solutions Associate (MCSA), Cisco Certified Network Professional (CCNP), VMware Certified Professional (VCP), and CompTIA A+ and Network+. Mauro is a recognized Microsoft MVP and has also been a long-time contributor to Windows Central. You can follow him on YouTube, Threads, BlueSky, X (Twitter), LinkedIn and About.me. Email him at Contact@Pureinfotech.com.\",\"sameAs\":[\"https:\/\/pureinfotech.com\",\"https:\/\/x.com\/@Pureinfotech\"],\"url\":\"https:\/\/pureinfotech.com\/mauro-huculak\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to exclude files and folders copy using Robocopy on Windows 11, 10 - Pureinfotech","description":"To exclude folder with robocopy on Windows 11 or 10, open Command Prompt (admin) and use \"XD\" or \"XF\" options with the robocopy 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:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/","og_locale":"en_US","og_type":"article","og_title":"How to exclude files and folders copy using Robocopy on Windows 11, 10 - Pureinfotech","og_description":"To exclude folder with robocopy on Windows 11 or 10, open Command Prompt (admin) and use \"XD\" or \"XF\" options with the robocopy command.","og_url":"https:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/","og_site_name":"Pureinfotech \u2022 Windows 10 &amp; Windows 11 help for humans","article_publisher":"https:\/\/facebook.com\/pureinfotech","article_published_time":"2023-08-02T10:00:30+00:00","article_modified_time":"2023-08-02T11:21:03+00:00","og_image":[{"width":1680,"height":1050,"url":"https:\/\/pureinfotech.com\/wp-content\/uploads\/2022\/02\/windows-11-robocopy-exclude-command-hero.webp","type":"image\/webp"}],"author":"Mauro Huculak","twitter_card":"summary_large_image","twitter_creator":"@Pureinfotech","twitter_site":"@Pureinfotech","twitter_misc":{"Written by":"Mauro Huculak","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/#article","isPartOf":{"@id":"https:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/"},"author":{"name":"Mauro Huculak","@id":"https:\/\/pureinfotech.com\/#\/schema\/person\/bf4921a81eb4380865af70691a93af43"},"headline":"How to exclude files and folders copy using Robocopy on Windows 11, 10","datePublished":"2023-08-02T10:00:30+00:00","dateModified":"2023-08-02T11:21:03+00:00","mainEntityOfPage":{"@id":"https:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/"},"wordCount":613,"publisher":{"@id":"https:\/\/pureinfotech.com\/#organization"},"image":{"@id":"https:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/02\/windows-11-robocopy-exclude-command-hero.webp?fit=1680%2C1050&quality=78&strip=all&ssl=1","keywords":["Difficulty level: Advanced","How-To","Windows 10","Windows 11","Windows Help"],"articleSection":["Features","Windows"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/","url":"https:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/","name":"How to exclude files and folders copy using Robocopy on Windows 11, 10 - Pureinfotech","isPartOf":{"@id":"https:\/\/pureinfotech.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/#primaryimage"},"image":{"@id":"https:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/02\/windows-11-robocopy-exclude-command-hero.webp?fit=1680%2C1050&quality=78&strip=all&ssl=1","datePublished":"2023-08-02T10:00:30+00:00","dateModified":"2023-08-02T11:21:03+00:00","description":"To exclude folder with robocopy on Windows 11 or 10, open Command Prompt (admin) and use \"XD\" or \"XF\" options with the robocopy command.","breadcrumb":{"@id":"https:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/#primaryimage","url":"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/02\/windows-11-robocopy-exclude-command-hero.webp?fit=1680%2C1050&quality=78&strip=all&ssl=1","contentUrl":"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/02\/windows-11-robocopy-exclude-command-hero.webp?fit=1680%2C1050&quality=78&strip=all&ssl=1","width":1680,"height":1050,"caption":"Robocopy exclude files and folders command"},{"@type":"BreadcrumbList","@id":"https:\/\/pureinfotech.com\/exclude-files-folders-robocopy-windows-10\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/pureinfotech.com\/"},{"@type":"ListItem","position":2,"name":"How to exclude files and folders copy using Robocopy on Windows 11, 10"}]},{"@type":"WebSite","@id":"https:\/\/pureinfotech.com\/#website","url":"https:\/\/pureinfotech.com\/","name":"Pureinfotech \u2022 Windows 10 &amp; Windows 11 help for humans","description":"Pureinfotech is the best site to get Windows help \u2013 featuring friendly how-to guides on Windows 10, Windows 11, Xbox, and other things tech, news, deals, reviews, and more.","publisher":{"@id":"https:\/\/pureinfotech.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pureinfotech.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/pureinfotech.com\/#organization","name":"Pureinfotech","url":"https:\/\/pureinfotech.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/pureinfotech.com\/#\/schema\/logo\/image\/","url":"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2019\/05\/pure-logo-v45.png?fit=192%2C192&quality=78&strip=all&ssl=1","contentUrl":"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2019\/05\/pure-logo-v45.png?fit=192%2C192&quality=78&strip=all&ssl=1","width":192,"height":192,"caption":"Pureinfotech"},"image":{"@id":"https:\/\/pureinfotech.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/facebook.com\/pureinfotech","https:\/\/x.com\/Pureinfotech","https:\/\/www.youtube.com\/user\/Pureinfotech"]},{"@type":"Person","@id":"https:\/\/pureinfotech.com\/#\/schema\/person\/bf4921a81eb4380865af70691a93af43","name":"Mauro Huculak","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/1cbac450402490f703560c52c3114f3e5ab02a741684eb73917885ae4a117a16?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/1cbac450402490f703560c52c3114f3e5ab02a741684eb73917885ae4a117a16?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1cbac450402490f703560c52c3114f3e5ab02a741684eb73917885ae4a117a16?s=96&d=mm&r=g","caption":"Mauro Huculak"},"description":"Mauro Huculak is a Windows How-To Expert and founder of Pureinfotech (est. 2010). With over 21 years as a technology writer and IT Specialist, Mauro specializes in Windows, software, and cross-platform systems such as Linux, Android, and macOS. Certifications he holds include Microsoft Certified Solutions Associate (MCSA), Cisco Certified Network Professional (CCNP), VMware Certified Professional (VCP), and CompTIA A+ and Network+. Mauro is a recognized Microsoft MVP and has also been a long-time contributor to Windows Central. You can follow him on YouTube, Threads, BlueSky, X (Twitter), LinkedIn and About.me. Email him at Contact@Pureinfotech.com.","sameAs":["https:\/\/pureinfotech.com","https:\/\/x.com\/@Pureinfotech"],"url":"https:\/\/pureinfotech.com\/mauro-huculak"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/02\/windows-11-robocopy-exclude-command-hero.webp?fit=1680%2C1050&quality=78&strip=all&ssl=1","jetpack-related-posts":[{"id":95164,"url":"https:\/\/pureinfotech.com\/robocopy-multithreaded-file-copy-windows-10\/","url_meta":{"origin":97366,"position":0},"title":"How to use Robocopy multi-threaded feature to speed up file copy on Windows 10","author":"Mauro Huculak","date":"August 19, 2025","format":false,"excerpt":"Speed up file transfers on Windows 10 with Robocopy's multi-threaded copy feature.","rel":"","context":"","block_context":{"text":"Features","link":"https:\/\/pureinfotech.com\/category\/features\/"},"img":{"alt_text":"Windows 10 Robocopy multithreaded","src":"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2023\/01\/robocopy-multithreaded-windows-10-hero.webp?fit=1200%2C750&quality=78&strip=all&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2023\/01\/robocopy-multithreaded-windows-10-hero.webp?fit=1200%2C750&quality=78&strip=all&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2023\/01\/robocopy-multithreaded-windows-10-hero.webp?fit=1200%2C750&quality=78&strip=all&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2023\/01\/robocopy-multithreaded-windows-10-hero.webp?fit=1200%2C750&quality=78&strip=all&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2023\/01\/robocopy-multithreaded-windows-10-hero.webp?fit=1200%2C750&quality=78&strip=all&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":94417,"url":"https:\/\/pureinfotech.com\/robocopy-transfer-files-fast-network-windows-10\/","url_meta":{"origin":97366,"position":1},"title":"How to use Robocopy to transfer files super-fast over the network on Windows 10","author":"Mauro Huculak","date":"January 13, 2023","format":false,"excerpt":"Windows 10 has a hidden tool called Robocopy to copy files quickly between computers over the network \u2014 here's how to use it.","rel":"","context":"","block_context":{"text":"Features","link":"https:\/\/pureinfotech.com\/category\/features\/"},"img":{"alt_text":"Robocopy on Windows 10","src":"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/11\/robocopy-windows-10-network-2023-hero.webp?fit=1200%2C750&quality=78&strip=all&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/11\/robocopy-windows-10-network-2023-hero.webp?fit=1200%2C750&quality=78&strip=all&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/11\/robocopy-windows-10-network-2023-hero.webp?fit=1200%2C750&quality=78&strip=all&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/11\/robocopy-windows-10-network-2023-hero.webp?fit=1200%2C750&quality=78&strip=all&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/11\/robocopy-windows-10-network-2023-hero.webp?fit=1200%2C750&quality=78&strip=all&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":53914,"url":"https:\/\/pureinfotech.com\/robocopy-recover-and-skip-files-with-errors-from-bad-hard-drive-in-windows\/","url_meta":{"origin":97366,"position":2},"title":"How to use Robocopy to recover and skip corrupted files from failing hard drive on Windows","author":"Mauro Huculak","date":"August 12, 2024","format":false,"excerpt":"If you have a failing hard drive, don't just \"copy and paste\" files, instead use this Robocopy to transfer files quickly while skipping those corrupted ones.","rel":"","context":"","block_context":{"text":"Windows","link":"https:\/\/pureinfotech.com\/category\/windows\/"},"img":{"alt_text":"Robocopy tool","src":"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2014\/04\/windows-robocopy-cmd-hero-mauro-huculak.webp?fit=1200%2C804&quality=78&strip=all&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2014\/04\/windows-robocopy-cmd-hero-mauro-huculak.webp?fit=1200%2C804&quality=78&strip=all&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2014\/04\/windows-robocopy-cmd-hero-mauro-huculak.webp?fit=1200%2C804&quality=78&strip=all&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2014\/04\/windows-robocopy-cmd-hero-mauro-huculak.webp?fit=1200%2C804&quality=78&strip=all&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2014\/04\/windows-robocopy-cmd-hero-mauro-huculak.webp?fit=1200%2C804&quality=78&strip=all&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":185302,"url":"https:\/\/pureinfotech.com\/robocopy-multithreaded-file-copy-windows-11\/","url_meta":{"origin":97366,"position":3},"title":"How to use Robocopy multithreaded option to speed up file copy on Windows 11","author":"Mauro Huculak","date":"February 10, 2026","format":false,"excerpt":"Windows 11 hides a faster way to copy files. Robocopy's multithreaded mode unlocks serious performance gains with a single switch.","rel":"","context":"","block_context":{"text":"Windows","link":"https:\/\/pureinfotech.com\/category\/windows\/"},"img":{"alt_text":"Robocopy multithreading option","src":"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2026\/02\/windows-11-robocopy-multi-threaded-hero.webp?fit=1200%2C750&quality=78&strip=all&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2026\/02\/windows-11-robocopy-multi-threaded-hero.webp?fit=1200%2C750&quality=78&strip=all&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2026\/02\/windows-11-robocopy-multi-threaded-hero.webp?fit=1200%2C750&quality=78&strip=all&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2026\/02\/windows-11-robocopy-multi-threaded-hero.webp?fit=1200%2C750&quality=78&strip=all&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2026\/02\/windows-11-robocopy-multi-threaded-hero.webp?fit=1200%2C750&quality=78&strip=all&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":138423,"url":"https:\/\/pureinfotech.com\/copy-files-fast-network-robocopy-windows-11\/","url_meta":{"origin":97366,"position":4},"title":"How to copy files fast over network using Robocopy on Windows 11","author":"Mauro Huculak","date":"June 19, 2023","format":false,"excerpt":"Here's how to leverage Rocopy and SMS compression to transfer files super fast over the network on Windows 11.","rel":"","context":"","block_context":{"text":"Features","link":"https:\/\/pureinfotech.com\/category\/features\/"},"img":{"alt_text":"Windows 11 Robocopy fast transfer","src":"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/03\/robocopy-windows-11-file-transfer-network_hero.webp?fit=1200%2C750&quality=78&strip=all&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/03\/robocopy-windows-11-file-transfer-network_hero.webp?fit=1200%2C750&quality=78&strip=all&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/03\/robocopy-windows-11-file-transfer-network_hero.webp?fit=1200%2C750&quality=78&strip=all&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/03\/robocopy-windows-11-file-transfer-network_hero.webp?fit=1200%2C750&quality=78&strip=all&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/03\/robocopy-windows-11-file-transfer-network_hero.webp?fit=1200%2C750&quality=78&strip=all&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":148237,"url":"https:\/\/pureinfotech.com\/windows-11-22h2-bug-file-copy\/","url_meta":{"origin":97366,"position":5},"title":"Windows 11 22H2 bug affecting file copy speeds over network (fixed)","author":"Mauro Huculak","date":"October 4, 2022","format":false,"excerpt":"Windows 11 22H2 can slow down file copying by up to 40 percent due to a kernel bug.","rel":"","context":"","block_context":{"text":"News","link":"https:\/\/pureinfotech.com\/category\/news\/"},"img":{"alt_text":"Windows 11 22H2 file copy bug","src":"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/10\/windows-11-22h2-file-copy-bug-hero.webp?fit=1200%2C743&quality=78&strip=all&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/10\/windows-11-22h2-file-copy-bug-hero.webp?fit=1200%2C743&quality=78&strip=all&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/10\/windows-11-22h2-file-copy-bug-hero.webp?fit=1200%2C743&quality=78&strip=all&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/10\/windows-11-22h2-file-copy-bug-hero.webp?fit=1200%2C743&quality=78&strip=all&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/pureinfotech.com\/wp-content\/uploads\/2022\/10\/windows-11-22h2-file-copy-bug-hero.webp?fit=1200%2C743&quality=78&strip=all&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/pureinfotech.com\/wp-json\/wp\/v2\/posts\/97366","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pureinfotech.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pureinfotech.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pureinfotech.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/pureinfotech.com\/wp-json\/wp\/v2\/comments?post=97366"}],"version-history":[{"count":0,"href":"https:\/\/pureinfotech.com\/wp-json\/wp\/v2\/posts\/97366\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pureinfotech.com\/wp-json\/wp\/v2\/media\/150525"}],"wp:attachment":[{"href":"https:\/\/pureinfotech.com\/wp-json\/wp\/v2\/media?parent=97366"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pureinfotech.com\/wp-json\/wp\/v2\/categories?post=97366"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pureinfotech.com\/wp-json\/wp\/v2\/tags?post=97366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}