{"id":421,"date":"2015-08-05T16:06:00","date_gmt":"2015-08-05T16:06:00","guid":{"rendered":"https:\/\/www.geekmungus.co.uk\/?p=421"},"modified":"2022-11-05T10:53:19","modified_gmt":"2022-11-05T10:53:19","slug":"copy-files-within-a-directory-structure-to-another-directory-leaving-the-directories-behind","status":"publish","type":"post","link":"https:\/\/geekmungus.co.uk\/?p=421","title":{"rendered":"Copy files within a directory structure to another directory, leaving the directories behind"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I had an interesting request, how to move a load of PDF files from one directory structure to another but leaving behind that directory structure so all the files end up in one directory in a huge list. I thought XCopy, but this appeared to be a better way.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>forfiles \/p c:\\source\\ \/M *.pdf \/S \/C \"cmd \/c copy @file c:\\destination\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Note: Files with the duplicate names are just overwritten.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had an interesting request, how to move a load of PDF files from one directory structure to another but leaving behind that directory structure so all the files end up in one directory in a huge list. I thought XCopy, but this appeared to be a better way. Note: Files with the duplicate names &#8230; <a title=\"Copy files within a directory structure to another directory, leaving the directories behind\" class=\"read-more\" href=\"https:\/\/geekmungus.co.uk\/?p=421\" aria-label=\"Read more about Copy files within a directory structure to another directory, leaving the directories behind\">Read more<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"class_list":["post-421","post","type-post","status-publish","format-standard","hentry","category-microsoft-windows"],"_links":{"self":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/421","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=421"}],"version-history":[{"count":1,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/421\/revisions"}],"predecessor-version":[{"id":1422,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/421\/revisions\/1422"}],"wp:attachment":[{"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geekmungus.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}