{"id":1177,"date":"2020-08-22T16:12:49","date_gmt":"2020-08-22T05:12:49","guid":{"rendered":"https:\/\/4it.com.au\/kb\/?post_type=article&#038;p=1177"},"modified":"2020-08-22T16:12:49","modified_gmt":"2020-08-22T05:12:49","slug":"how-to-robocopy-command-line","status":"publish","type":"article","link":"https:\/\/4it.com.au\/kb\/article\/how-to-robocopy-command-line\/","title":{"rendered":"How to &#8211; Robocopy Command Line"},"content":{"rendered":"<p>Robocopy is used to copy directories and files in windows.\u00a0 Here are some Robocopy examples which can be used.<\/p>\n<h3>Robocopy &#8211; How to copy a directory<\/h3>\n<p>As the title says this Robocopy command will copy a directory to another location.<\/p>\n<p><strong>Robocopy C:\\test D:\\test<\/strong><\/p>\n<p><img class=\"alignnone wp-image-1179 size-full\" data-original=\"https:\/\/4it.com.au\/kb\/wp-content\/uploads\/2020\/08\/Pasted-into-How-to-Robocopy-Command-Line-1.png\" \/><\/p>\n<h3>Robocopy &#8211; How to copy the complete folder hierarchy or directory structure<\/h3>\n<p><strong>Robocopy \/S C:\\test\\subfolder D:\\backup\\test<\/strong><\/p>\n<h3>Robocopy &#8211; How to cust and paste using the Robocopy Command<\/h3>\n<p>To cut and paste in Robocopy you use the \/MOV switch.\u00a0 The \/MOV switch will delete files and the \/MOVE switch will delete directories as well.<\/p>\n<p>For example &#8211; Deleting files only<\/p>\n<p><strong>robocopy \/mov \/s \/e c:\\test\\test c:\\test1\\test<\/strong><\/p>\n<p>And for deleting files along with the directories<\/p>\n<p><strong>robocopy \/move \/s \/e c:\\test\\test c:\\test1\\test<\/strong><\/p>\n<h3>How to set the Hidden Attribute in Robocopy<\/h3>\n<p>To set the hidden attribute we use the\u00a0 \/A+:H attribute (A stands for Attribute and H stands for Hidden)<\/p>\n<p><strong>robocopy \/s \/e \/a+:h c:\\test c:\\test1<\/strong><\/p>\n<p>There are a few more switches and options, we&#8217;ll add them as we come across them.\u00a0 If you know of any others let us know in the comments.<\/p>\n<p>&nbsp;<\/p>\n<div style='text-align:left' class='yasr-auto-insert-visitor'><\/div>","protected":false},"excerpt":{"rendered":"<p>Robocopy is used to copy directories and files in windows.\u00a0 Here are some Robocopy examples which can be used. Robocopy &#8211; How to copy a directory As the title says this Robocopy command will copy a directory to another location. Robocopy C:\\test D:\\test Robocopy &#8211; How to copy the complete folder hierarchy or directory structure [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","article-category":[9],"article-tag":[788,342,784,783,785,786,787],"class_list":["post-1177","article","type-article","status-publish","format-standard","hentry","article-category-windows-commands","article-tag-how-to-run-robocopy-command","article-tag-robocopy","article-tag-robocopy-commands","article-tag-robocopy-examples","article-tag-robocopy-switches","article-tag-robocopy-syntax","article-tag-using-robocopy-to-move-files"],"yasr_visitor_votes":{"stars_attributes":{"read_only":false,"span_bottom":false},"number_of_votes":2,"sum_votes":8},"_links":{"self":[{"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article\/1177","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/types\/article"}],"author":[{"embeddable":true,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/comments?post=1177"}],"version-history":[{"count":0,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article\/1177\/revisions"}],"wp:attachment":[{"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/media?parent=1177"}],"wp:term":[{"taxonomy":"article-category","embeddable":true,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article-category?post=1177"},{"taxonomy":"article-tag","embeddable":true,"href":"https:\/\/4it.com.au\/kb\/wp-json\/wp\/v2\/article-tag?post=1177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}