{"id":1981,"date":"2019-09-11T11:14:59","date_gmt":"2019-09-11T11:14:59","guid":{"rendered":"https:\/\/www.stcleaner.com\/blog\/?p=1981"},"modified":"2019-09-11T11:14:59","modified_gmt":"2019-09-11T11:14:59","slug":"how-to-use-robocopy-in-windows-10","status":"publish","type":"post","link":"https:\/\/www.stcleaner.com\/blog\/2019\/09\/11\/how-to-use-robocopy-in-windows-10\/","title":{"rendered":"How To Use Robocopy In Windows 10"},"content":{"rendered":"<p><b>Robocopy <\/b><span style=\"font-weight: 400\">is a powerful command-line in Windows operating system that allows users to copy <\/span><b>files<\/b><span style=\"font-weight: 400\">, <\/span><b>folders <\/b><span style=\"font-weight: 400\">and <\/span><b>partitions<\/b><span style=\"font-weight: 400\">. It was first introduced in the <\/span><b>Windows NT <\/b><span style=\"font-weight: 400\">operating system as part of a resource kit in late 1993. It was continued in later versions such as <\/span><b>Windows 2000<\/b><span style=\"font-weight: 400\">, <\/span><b>Vista<\/b><span style=\"font-weight: 400\">, <\/span><b>Windows 7<\/b><span style=\"font-weight: 400\">, <\/span><b>8 <\/b><span style=\"font-weight: 400\">and <\/span><b>10<\/b><span style=\"font-weight: 400\">. Although it was not part of <\/span><b>Windows XP <\/b><span style=\"font-weight: 400\">and <\/span><b>Windows Server 2003<\/b><span style=\"font-weight: 400\">, users always had an option to independently download an official toolkit from the <\/span><a href=\"https:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=17657\" target=\"_blank\"><span style=\"font-weight: 400\">Microsoft Download Center<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/p>\n<p><!--more--><\/p>\n<h1><span style=\"font-weight: 400\">Usage On Windows 10<\/span><\/h1>\n<h2><span style=\"font-weight: 400\">Opening Command Prompt<\/span><\/h2>\n<p><span style=\"font-weight: 400\">First and foremost, you must open <\/span><b>Command Prompt <\/b><span style=\"font-weight: 400\">tool in order to use Robocopy.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Some folders\/ files may require you to obtain <strong>administrative privileges<\/strong>. Therefore, it is recommended to run <\/span><b>elevated Command Prompt<\/b><span style=\"font-weight: 400\">. The steps are outlined below:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Press the <\/span><b>Windows Key<\/b><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Type <\/span><b>Command Prompt <\/b><span style=\"font-weight: 400\">in the <\/span><b>Search <\/b><span style=\"font-weight: 400\">box.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Right-click on <\/span><b>Command Prompt<\/b><span style=\"font-weight: 400\">, and select <\/span><b>Run as Administrator<\/b><span style=\"font-weight: 400\">.<\/span><\/li>\n<\/ol>\n<h2><span style=\"font-weight: 400\">1. Copy An Entire Directory<\/span><\/h2>\n<p><span style=\"font-weight: 400\">The following command will copy an entire directory, including all files and sub-folders. You may use this command to backup your documents and files to a different partition, external hard disk or a USB stick.<\/span><\/p>\n<p><b>Syntax<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Robocopy &lt;Source Directory&gt; &lt;Destination Directory&gt;<\/span><\/li>\n<\/ul>\n<p><b>Example<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Robocopy C:\\Users\\Vikas\\Documents D:\\MyFiles<\/span><\/li>\n<\/ul>\n<h2><span style=\"font-weight: 400\">2. Copy An Entire Directory &amp; Retain Folder Structure<\/span><\/h2>\n<p><span style=\"font-weight: 400\">The following command will deep copy your entire directory while retaining folder structure. Your files will continue to appear in the same hierarchical tree structure as earlier.<\/span><\/p>\n<p><b>Syntax<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Robocopy \/S \/E &lt;Source Directory&gt; &lt;Destination Directory&gt;<\/span><\/li>\n<\/ul>\n<p><b>Example<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Robocopy \/S \/E\u00a0 C:\\Users\\Vikas\\Documents D:\\MyFiles<\/span><\/li>\n<\/ul>\n<h2><span style=\"font-weight: 400\">3. Copy An Entire Directory Except Empty Folders &amp; Retain Original Folder Structure<\/span><\/h2>\n<p><span style=\"font-weight: 400\">Just like the above command, this will copy an entire directory while retaining its original folder structure. The only difference is that this command will not copy empty folders, if any, from the source directory.<\/span><\/p>\n<p><b>Syntax<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Robocopy \/S &lt;Source Directory&gt; &lt;Destination Directory&gt;<\/span><\/li>\n<\/ul>\n<p><b>Example<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Robocopy \/S C:\\Users\\Vikas\\Documents D:\\MyFiles<\/span><\/li>\n<\/ul>\n<h2><span style=\"font-weight: 400\">4. Self-destructible Directory Copying<\/span><\/h2>\n<p><span style=\"font-weight: 400\">Self-destructible Directory Copying copies an entire directory to a different location and then deletes the source directory including all of its contents.<\/span><\/p>\n<p><b>Syntax<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Robocopy \/MOVE \/S \/E &lt;Source Directory&gt; &lt;Destination Directory&gt;<\/span><\/li>\n<\/ul>\n<p><b>Example<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Robocopy \/MOVE \/S \/E C:\\Users\\Vikas\\Documents D:\\MyFiles<\/span><\/li>\n<\/ul>\n<h2><span style=\"font-weight: 400\">5. Self-destructible File Copying<\/span><\/h2>\n<p><span style=\"font-weight: 400\">The following command will copy an entire directory to the target location and then delete all files from the source directory.<\/span><\/p>\n<p><b>Syntax<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Robocopy \/MOV \/S \/E &lt;Source Directory&gt; &lt;Destination Directory&gt;<\/span><\/li>\n<\/ul>\n<p><b>Example<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Robocopy \/MOV \/S \/E C:\\Users\\Vikas\\Documents D:\\MyFiles<\/span><\/li>\n<\/ul>\n<h2><span style=\"font-weight: 400\">6. Mirror Copying<\/span><\/h2>\n<p><span style=\"font-weight: 400\">The following command will create a replica of the source directory into the target directory. Be careful that it will delete additional files from the target directory that are not part of the source directory.<\/span><\/p>\n<p><b>Syntax<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Robocopy \/MIR &lt;Source Directory&gt; &lt;Destination Directory&gt;<\/span><span style=\"font-weight: 400\"><br \/>\n<\/span><\/li>\n<\/ul>\n<p><b>Example<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Robocopy \/MIR C:\\Users\\Vikas\\Documents D:\\MyFiles<\/span><\/li>\n<\/ul>\n<h2><span style=\"font-weight: 400\">7. Copy Directory &amp; Change Folder Attributes<\/span><\/h2>\n<p><span style=\"font-weight: 400\">This command will copy an entire directory to the target folder. After successful completion, it\u2019ll change attribute of the target folder.<\/span><\/p>\n<p><b>Syntax<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Robocopy \/S \/E \/&lt;New Folder Attributes\/ Combinations&gt; &lt;Source Directory&gt; &lt;Destination Directory&gt;<\/span><\/li>\n<\/ul>\n<p><b>Example<\/b><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Robocopy \/S \/E \/R+:H C:\\Users\\Vikas\\Documents D:\\MyFiles<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">(The <strong>R+:H<\/strong> switch will apply Read-Only and Hidden attributes to the target folder)<\/span><\/p>\n<p><span style=\"font-weight: 400\">The codenames for popular file attributes are as further:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">R: Read-Only File<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">H: Hidden File<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">C: Compressed File (Zip)<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">T: Temporary File<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">E: Encrypted File<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">A: Archived File<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">S: System File<\/span><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Robocopy is a powerful command-line in Windows operating system that allows users to copy files, folders and partitions. It was first introduced in the Windows NT operating system as part of a resource kit in late 1993. It was continued in later versions such as Windows 2000, Vista, Windows 7, 8 and 10. Although it [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[937],"tags":[1042,1040,1045,1044,1043,1046,1047,1041],"class_list":["post-1981","post","type-post","status-publish","format-standard","hentry","category-entertainment","tag-how-to-use-robocopy","tag-robocopy","tag-robocopy-command","tag-robocopy-examples","tag-robocopy-syntax","tag-robocopy-windows-10","tag-run-robocopy-on-windows-10","tag-what-is-robocopy"],"_links":{"self":[{"href":"https:\/\/www.stcleaner.com\/blog\/wp-json\/wp\/v2\/posts\/1981","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.stcleaner.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.stcleaner.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.stcleaner.com\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.stcleaner.com\/blog\/wp-json\/wp\/v2\/comments?post=1981"}],"version-history":[{"count":1,"href":"https:\/\/www.stcleaner.com\/blog\/wp-json\/wp\/v2\/posts\/1981\/revisions"}],"predecessor-version":[{"id":1982,"href":"https:\/\/www.stcleaner.com\/blog\/wp-json\/wp\/v2\/posts\/1981\/revisions\/1982"}],"wp:attachment":[{"href":"https:\/\/www.stcleaner.com\/blog\/wp-json\/wp\/v2\/media?parent=1981"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.stcleaner.com\/blog\/wp-json\/wp\/v2\/categories?post=1981"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.stcleaner.com\/blog\/wp-json\/wp\/v2\/tags?post=1981"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}