{"id":134,"date":"2014-10-02T11:49:03","date_gmt":"2014-10-02T11:49:03","guid":{"rendered":"http:\/\/timbertops.co.uk\/blog\/?p=134"},"modified":"2019-04-04T20:42:41","modified_gmt":"2019-04-04T19:42:41","slug":"a-useful-robocopy-command","status":"publish","type":"post","link":"https:\/\/timbertops.co.uk\/index.php\/2014\/10\/02\/a-useful-robocopy-command\/","title":{"rendered":"A useful robocopy command"},"content":{"rendered":"<p>Often at work I need to copy data around and I use a niffy program called robocopy its built in to windows from at least 7 and above (not sure about vista &amp; XP)<br \/>\nthis is how I use it <code lang=\"dos\">robocopy &lt;source&gt; &lt;dest&gt; \/E \/ZB \/XJ \/R:1 \/W:1 \/XF hiberfil.sys pagefile.sys<\/code><br \/>\n<!--more--><br \/>\nthe robocopy needs to be run from an elevated command prompt or it will likely fail and not copy all files<br \/>\nbelow is a quick break down of the switches used above<br \/>\n\/E copy all files and sub-folders<br \/>\n\/ZB try to copy first if that fails use backup mode<br \/>\n\/XJ ignore system junction points (these are like shortcut only on the disc copying these can cause recursion problems quickly filling the entire destination drive with undeletedable files)<br \/>\n\/R:1 \/W:1 Retry the copy once and wait 1 second between retrys<br \/>\n\/XF hiberfil.sys pagefile.sys exclude the hibernation file and page file<\/p>\n<p>also its worth noting robocopy can hide the destination files\/folders sometimes so it may n=be necessary to run  <code lang=dos>attrib -A -S -H &lt;dest&gt; \/S \/D<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Often at work I need to copy data around and I use a niffy program called robocopy its built in to windows from at least 7 and above (not sure about vista &amp; XP) this is how I use it robocopy &lt;source&gt; &lt;dest&gt; \/E \/ZB \/XJ \/R:1 \/W:1 \/XF hiberfil.sys pagefile.sys<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-134","post","type-post","status-publish","format-standard","hentry","category-programming"],"_links":{"self":[{"href":"https:\/\/timbertops.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/134","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/timbertops.co.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/timbertops.co.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/timbertops.co.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/timbertops.co.uk\/index.php\/wp-json\/wp\/v2\/comments?post=134"}],"version-history":[{"count":8,"href":"https:\/\/timbertops.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/134\/revisions"}],"predecessor-version":[{"id":204,"href":"https:\/\/timbertops.co.uk\/index.php\/wp-json\/wp\/v2\/posts\/134\/revisions\/204"}],"wp:attachment":[{"href":"https:\/\/timbertops.co.uk\/index.php\/wp-json\/wp\/v2\/media?parent=134"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/timbertops.co.uk\/index.php\/wp-json\/wp\/v2\/categories?post=134"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/timbertops.co.uk\/index.php\/wp-json\/wp\/v2\/tags?post=134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}