{"id":5817,"date":"2021-11-17T04:48:35","date_gmt":"2021-11-17T04:48:35","guid":{"rendered":"https:\/\/lgildv5i97.onrocket.site\/answers\/?post_type=question&#038;p=5817"},"modified":"2021-11-17T04:50:51","modified_gmt":"2021-11-17T04:50:51","slug":"robocopy-copy-folders-content-to-a-single-folder","status":"publish","type":"question","link":"https:\/\/computing.net\/answers\/programming\/robocopy-copy-folders-content-to-a-single-folder\/27235.html","title":{"rendered":"ROBOCOPY &#8211; Copy Folders Content To A Single Folder."},"content":{"rendered":"<p>Here is some code I made \ud83d\ude42<\/p>\n<p>@echo off<br \/>\nset source=&#8221;R:\\Contracts\\&#8221;<br \/>\nset destination=&#8221;R:\\Contracts\\Sites\\&#8221;<br \/>\nROBOCOPY %source% %destination% *.srt *.pdf *.mp4 *.jpg \/COPYALL \/R:0 \/S<br \/>\nfor \/r %source in (*) do @copy &#8220;%destination&#8221; .<\/p>\n<p>R:\\Contracts\\ is full of folders which have files in them.<\/p>\n<p>I want to copy all to R:\\Contracts\\Sites\\ and flatten the folder structure.<\/p>\n<p>Everything copies well but also the folder structure.<\/p>\n<p>Thank you<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"iawp_total_views":3},"question-category":[55],"question_tags":[],"class_list":["post-5817","question","type-question","status-publish","hentry","question-category-programming"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question\/5817","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question"}],"about":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/types\/question"}],"author":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/comments?post=5817"}],"wp:attachment":[{"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/media?parent=5817"}],"wp:term":[{"taxonomy":"question-category","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question-category?post=5817"},{"taxonomy":"question_tags","embeddable":true,"href":"https:\/\/computing.net\/answers\/wp-json\/wp\/v2\/question_tags?post=5817"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}