{"id":4628,"date":"2023-06-28T06:24:00","date_gmt":"2023-06-28T04:24:00","guid":{"rendered":"https:\/\/expert-only.com\/?p=4628"},"modified":"2023-09-25T14:42:35","modified_gmt":"2023-09-25T12:42:35","slug":"copy-files-recursively-with-cmd","status":"publish","type":"post","link":"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/","title":{"rendered":"How to copy files recursively using Windows cmd?"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\" id=\"h-script-examples-to-do-a-recursive-windows-copy-using-the-xcopy-command\"><strong><em>Script examples to do a recursive Windows copy using the xcopy command. <\/em><\/strong><\/h3>\n\n\n\n<p>To copy files recursively with the cmd command prompt, use the Windows xcopy command and the recursive option. The xcopy command is very similar to the copy command but it handles recursion and has many other options mainly related to recursion.<\/p>\n\n\n\n<p>Indeed, when copying a large number of files and folders, it is useful to be able to copy all the files without naming them explicitly. This tutorial is not exhaustive, but offers a good overview of the main options, of course it is possible to combine them to have even more powerful scripts.<\/p>\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\/copy-files-recursively-with-cmd\/#1-basic-xcopy-option-to-copy-files-recursively\" >1. Basic xcopy option to copy files recursively<\/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\/copy-files-recursively-with-cmd\/#2-overwrite-existing-files-without-cmd-prompt\" >2. Overwrite existing files without cmd 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\/copy-files-recursively-with-cmd\/#3-ignore-recursive-xcopy-errors-with-the-c-option\" >3. Ignore recursive xcopy errors with the c option<\/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\/copy-files-recursively-with-cmd\/#4-display-full-source-and-target-filenames-with-xcopy\" >4. Display full source and target filenames with xcopy<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/#5-simulate-a-cmd-xcopy-process-with-the-%e2%80%98l-option\" >5. Simulate a cmd xcopy process with the &#8216;l&#8217; option<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/#6-recursively-and-silently-copy-files-with-cmd-and-the-quiet-option\" >6. Recursively and silently copy files with cmd and the quiet option<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/#7-update-the-target-folders-using-the-xcopy-u-and-s-options\" >7. Update the target folders using the xcopy u and s options<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/#8-ensure-the-integrity-of-copied-windows-files\" >8. Ensure the integrity of copied Windows files<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/#9-add-a-manual-control-step-before-the-copy-of-files\" >9. Add a manual control step before the copy of files<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1-basic-xcopy-option-to-copy-files-recursively\"><\/span>1. Basic xcopy option to copy files recursively <span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Perhaps the most important and useful option of the xcopy command is the recursive option. The &#8220;s&#8221; option indicates to copy all directories and subdirectories with their contents. An exception for empty directories. Indeed with this option, by default the system does not copy empty directories.<\/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=\"\">xcopy \/s SubFolder* SubFolder_2<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-2-overwrite-existing-files-without-cmd-prompt\"><span class=\"ez-toc-section\" id=\"2-overwrite-existing-files-without-cmd-prompt\"><\/span>2. Overwrite existing files without cmd prompt<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Same script, but this time using an option to avoid the prompt to overwrite existing files. Use this command with the &#8220;y&#8221; option:<\/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=\"\">xcopy \/s \/y SubFolder* SubFolder_2<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"les-autres-options-utiles-de-xcopy-pour-mieux-controler-la-copie-des-fichiers\"><span class=\"ez-toc-section\" id=\"3-ignore-recursive-xcopy-errors-with-the-c-option\"><\/span>3. Ignore recursive xcopy errors with the c option<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The &#8220;c&#8221; option is used to ignore errors during copying. Useful when copying a large number of files. Thus, at the end of the copy, only the errors are to be corrected and not all the files.<\/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=\"\">xcopy \/s \/c SubFolder* SubFolder_2<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-4-display-full-source-and-target-filenames-with-xcopy\"><span class=\"ez-toc-section\" id=\"4-display-full-source-and-target-filenames-with-xcopy\"><\/span><strong>4. Display full source and target filenames with xcopy<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In this fourth command line script example, we use the recursively copy files with cmd and the xcopy f option. Use the xcopy&#8217;s f option to display full source and target filenames with paths. The paths are absolute, i.e., <strong>they start from the Windows drive letter, like C:\\ for example<\/strong>.<\/p>\n\n\n\n<p>Let&#8217;s check a simple example with multiple levels of subfolders. Start by displaying the structure of the folders and the files, here it is the <strong>C:\\Folder<\/strong>. We have 8 files in 2 different folders at different levels.<\/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=\"\">dir \/s \/b<\/pre>\n\n\n\n<p><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"940\" height=\"566\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/11\/cmd-recursively-copy-files-folders-list-files.jpg\" alt=\"List source folder and subfolders before the xcopy recursive conmand\" class=\"wp-image-26806\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/11\/cmd-recursively-copy-files-folders-list-files.jpg 940w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/11\/cmd-recursively-copy-files-folders-list-files-300x181.jpg 300w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/11\/cmd-recursively-copy-files-folders-list-files-768x462.jpg 768w\" sizes=\"auto, (max-width: 940px) 100vw, 940px\" \/><figcaption class=\"wp-element-caption\"><em>List source folder and subfolders before the xcopy recursive conmand<\/em><\/figcaption><\/figure><\/div>\n\n\n<p>Now let&#8217;s copy recursively the content of the SubFolder and all other subfolders into the SubFolder_2 folder.<\/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=\"\">xcopy \/s \/f SubFolder SubFolder_2<\/pre>\n\n\n\n<p>Then we can double check that all the source files were copied properly in the target folder, with the same structure.<\/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=\"\">dir \/s \/b SubFolder_2<\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"996\" height=\"541\" src=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/11\/cmd-recursively-copy-files-xcopy-option-s-f-result.jpg\" alt=\"Copy files and folders recursively in cmd with xcopy recursive option\" class=\"wp-image-26810\" srcset=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/11\/cmd-recursively-copy-files-xcopy-option-s-f-result.jpg 996w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/11\/cmd-recursively-copy-files-xcopy-option-s-f-result-300x163.jpg 300w, https:\/\/expert-only.com\/wp-content\/uploads\/2022\/11\/cmd-recursively-copy-files-xcopy-option-s-f-result-768x417.jpg 768w\" sizes=\"auto, (max-width: 996px) 100vw, 996px\" \/><figcaption class=\"wp-element-caption\"><em>Copy files and folders recursively in cmd with xcopy recursive option<\/em><\/figcaption><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-5-simulate-a-cmd-xcopy-process-with-the-l-option\"><span class=\"ez-toc-section\" id=\"5-simulate-a-cmd-xcopy-process-with-the-%e2%80%98l-option\"><\/span>5. Simulate a cmd xcopy process with the &#8216;l&#8217; option<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><strong>The xcopy \/l command is a simulation of the Copy files recursively with cmdcopy<\/strong>. Use the &#8220;l&#8221; option to display only a complete list of files to copy. But don&#8217;t actually copy the files. It is very useful to double check the complete file list before an actual copy.<\/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=\"\">xcopy \/s \/l SubFolder* SubFolder_2<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-6-recursively-and-silently-copy-files-with-cmd-and-the-quiet-option\"><span class=\"ez-toc-section\" id=\"6-recursively-and-silently-copy-files-with-cmd-and-the-quiet-option\"><\/span>6. Recursively and silently copy files with cmd and the quiet option<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Tells the system not to display messages from xcopy on the prompt screen. Can be useful in batch scripts for example. The result is that the terminal only displays the total number of files copied.<\/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=\"\">xcopy \/s \/q SubFolder* SubFolder_2<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-7-update-the-target-folders-using-the-xcopy-u-and-s-options\"><span class=\"ez-toc-section\" id=\"7-update-the-target-folders-using-the-xcopy-u-and-s-options\"><\/span>7. Update the target folders using the xcopy u and s options<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><strong>To copy only existing files on both source and destination recursively, use the xcopy \/s \/u option.<\/strong> This is a useful option to update a target folder for example. And align all latest versions in the target with a given source folder. In other words this option synchronize the content of the source and target folders.<\/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=\"\">xcopy \/s \/u SubFolder* SubFolder_2<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-8-ensure-the-integrity-of-copied-windows-files\"><span class=\"ez-toc-section\" id=\"8-ensure-the-integrity-of-copied-windows-files\"><\/span>8. Ensure the integrity of copied Windows files<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>The verification option is xcopy \/v. Verifies each file after copying, verifying that the source and target are identical. Useful for sensitive data or large files.<\/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=\"\">xcopy \/s \/v SubFolder* SubFolder_2<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-9-add-a-manual-control-step-before-the-copy-of-files\"><span class=\"ez-toc-section\" id=\"9-add-a-manual-control-step-before-the-copy-of-files\"><\/span>9. Add a manual control step before the copy of files<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Displays this message in the Windows prompt to manually start copying files: &#8220;Press any key to begin copying file(s)&#8221;. This option adds a manual control step to the copy process. Interesting in an integrated batch with other control steps.<\/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=\"\">xcopy \/s \/w SubFolder* SubFolder_2<\/pre>\n\n\n\n<p>In this article on <a href=\"https:\/\/docs.microsoft.com\/fr-fr\/windows-server\/administration\/windows-commands\/xcopy\" target=\"_blank\" rel=\"noreferrer noopener\">xcopy<\/a>, we saw some of the main options available in this powerful Windows command to copy files recursively with cmd.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">MS-DOS tutorials to manage Windows files and folders<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/expert-only.com\/en\/ms-dos\/list-files-recursively-with-cmd\/\">How to list files recursively with cmd in folders?<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/expert-only.com\/en\/ms-dos\/delete-files-recursively-with-cmd\/\">Delete Windows files recursively with cmd<\/a>.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>Script examples to do a recursive Windows copy using the xcopy command. To copy files recursively with the cmd command prompt, use the Windows xcopy command and the recursive option. The xcopy command is very similar to the copy <a class=\"mh-excerpt-more\" href=\"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/\" title=\"How to copy files recursively using Windows cmd?\">&#8230;<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":6108,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[410],"tags":[412,417,418,424,414],"class_list":{"0":"post-4628","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-ms-dos","8":"tag-batch","9":"tag-file","10":"tag-folder","11":"tag-recursive","12":"tag-script"},"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 copy files recursively using Windows cmd? MS-DOS<\/title>\n<meta name=\"description\" content=\"To recursively copy files with cmd and the Windows xcopy command, use a script with the recursive options available in MS-DOS.\" \/>\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\/copy-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 copy files recursively using Windows cmd?\" \/>\n<meta property=\"og:description\" content=\"To recursively copy files with cmd and the Windows xcopy command, use a script with the recursive options available in MS-DOS.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/expert-only.com\/en\/ms-dos\/copy-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-06-28T04:24:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-25T12:42:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/01\/planning-5570360_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=\"4 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\/copy-files-recursively-with-cmd\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/\"},\"author\":{\"name\":\"Expert-Only\",\"@id\":\"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef\"},\"headline\":\"How to copy files recursively using Windows cmd?\",\"datePublished\":\"2023-06-28T04:24:00+00:00\",\"dateModified\":\"2023-09-25T12:42:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/\"},\"wordCount\":701,\"publisher\":{\"@id\":\"https:\/\/expert-only.com\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/01\/planning-5570360_1920.jpg\",\"keywords\":[\"Batch\",\"File\",\"Folder\",\"Recursive\",\"Script\"],\"articleSection\":[\"MS-DOS\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/\",\"url\":\"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/\",\"name\":\"How to copy files recursively using Windows cmd? MS-DOS\",\"isPartOf\":{\"@id\":\"https:\/\/expert-only.com\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/01\/planning-5570360_1920.jpg\",\"datePublished\":\"2023-06-28T04:24:00+00:00\",\"dateModified\":\"2023-09-25T12:42:35+00:00\",\"description\":\"To recursively copy files with cmd and the Windows xcopy command, use a script with the recursive options available in MS-DOS.\",\"breadcrumb\":{\"@id\":\"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/#primaryimage\",\"url\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/01\/planning-5570360_1920.jpg\",\"contentUrl\":\"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/01\/planning-5570360_1920.jpg\",\"width\":1920,\"height\":1080},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/expert-only.com\/en\/ms-dos\/copy-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 copy files recursively using Windows 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 copy files recursively using Windows cmd? MS-DOS","description":"To recursively copy files with cmd and the Windows xcopy command, use a script with the recursive options available in MS-DOS.","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\/copy-files-recursively-with-cmd\/","og_locale":"en_US","og_type":"article","og_title":"How to copy files recursively using Windows cmd?","og_description":"To recursively copy files with cmd and the Windows xcopy command, use a script with the recursive options available in MS-DOS.","og_url":"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/","og_site_name":"SQL and IT Tutorials","article_publisher":"https:\/\/www.facebook.com\/ExpertOnlyCom\/","article_published_time":"2023-06-28T04:24:00+00:00","article_modified_time":"2023-09-25T12:42:35+00:00","og_image":[{"width":1920,"height":1080,"url":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/01\/planning-5570360_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":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/#article","isPartOf":{"@id":"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/"},"author":{"name":"Expert-Only","@id":"https:\/\/expert-only.com\/en\/#\/schema\/person\/406a9576b52944f018739a42046873ef"},"headline":"How to copy files recursively using Windows cmd?","datePublished":"2023-06-28T04:24:00+00:00","dateModified":"2023-09-25T12:42:35+00:00","mainEntityOfPage":{"@id":"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/"},"wordCount":701,"publisher":{"@id":"https:\/\/expert-only.com\/en\/#organization"},"image":{"@id":"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/#primaryimage"},"thumbnailUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/01\/planning-5570360_1920.jpg","keywords":["Batch","File","Folder","Recursive","Script"],"articleSection":["MS-DOS"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/","url":"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/","name":"How to copy files recursively using Windows cmd? MS-DOS","isPartOf":{"@id":"https:\/\/expert-only.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/#primaryimage"},"image":{"@id":"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/#primaryimage"},"thumbnailUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/01\/planning-5570360_1920.jpg","datePublished":"2023-06-28T04:24:00+00:00","dateModified":"2023-09-25T12:42:35+00:00","description":"To recursively copy files with cmd and the Windows xcopy command, use a script with the recursive options available in MS-DOS.","breadcrumb":{"@id":"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/expert-only.com\/en\/ms-dos\/copy-files-recursively-with-cmd\/#primaryimage","url":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/01\/planning-5570360_1920.jpg","contentUrl":"https:\/\/expert-only.com\/wp-content\/uploads\/2022\/01\/planning-5570360_1920.jpg","width":1920,"height":1080},{"@type":"BreadcrumbList","@id":"https:\/\/expert-only.com\/en\/ms-dos\/copy-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 copy files recursively using Windows 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\/4628","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=4628"}],"version-history":[{"count":27,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts\/4628\/revisions"}],"predecessor-version":[{"id":27057,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/posts\/4628\/revisions\/27057"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/media\/6108"}],"wp:attachment":[{"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/media?parent=4628"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/categories?post=4628"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/expert-only.com\/en\/wp-json\/wp\/v2\/tags?post=4628"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}