{"id":30523,"date":"2018-02-26T20:13:28","date_gmt":"2018-02-26T20:13:28","guid":{"rendered":"http:\/\/www.oracletutoring.ca\/blog\/?p=30523"},"modified":"2018-02-26T20:13:28","modified_gmt":"2018-02-26T20:13:28","slug":"windows-home-computer-use-command-prompt-file-operations-xcopy","status":"publish","type":"post","link":"https:\/\/www.oracletutoring.ca\/blog\/windows-home-computer-use-command-prompt-file-operations-xcopy\/","title":{"rendered":"Windows, home computer use: command prompt file operations: xcopy"},"content":{"rendered":"<h1>Maintaining a home computer requires frequent self-tutoring. The tutor shares.<\/h1>\n<p>This Windows 7 computer no longer performs the COPY command from the mouse, so I use the command prompt to copy files, etc.<\/p>\n<p>Lately I&#8217;ve been backing up directories, which contain subdirectories and so on. (Directory can also be thought of as Folder.)<\/p>\n<p>To copy an entire directory, including its subdirectories and the folders contained therein, I use the <code>xcopy<\/code> command:<br \/>\n<code><br \/>\nxcopy source_directory destination_directory \/e<br \/>\n<\/code><br \/>\nor<br \/>\n<code><br \/>\nxcopy source_directory destination_directory \/s<br \/>\n<\/code><\/p>\n<p>With <code>\/e<\/code> it copies the empty folders, but not with <code>\/s<\/code>.<\/p>\n<p>In my experience, assigning a destination directory is important, since <code>xcopy<\/code> doesn&#8217;t copy the enclosing directory itself, just its contents. So, for instance, if you want to copy the directory <i>desktop0<\/i> to a backup called <i>desktop0<\/i>, you might key<br \/>\n<code><br \/>\nxcopy the_source_path\\desktop0 the_destination_path\\desktop0 \/e<br \/>\n<\/code><\/p>\n<p>Observations:<\/p>\n<ol>\n<li>Although you can use the forward slash to navigate in Windows, it can&#8217;t (in my experience) be used in paths in Windows commands. Rather, the backslash must be. For instance, <code>topdir\\dir1\\dir2<\/code> must be used, rather than <code>topdir\/dir1\/dir2<\/code>, within a file command such as <code>xcopy<\/code>. However, for switches such as <code>\/s<\/code> or <code>\/e<\/code>, the forward slash is used.\n<\/li>\n<li>\nYou can&#8217;t use <code>xcopy<\/code> from within a directory you&#8217;re telling it to copy. I typically do it from the one above.\n<\/li>\n<\/ol>\n<p>Source:<\/p>\n<p><a href=\"https:\/\/www.lifewire.com\/xcopy-command-2618103\">www.lifewire.com<\/a><\/p>\n<p>Jack of <a href=\"https:\/\/www.oracletutoring.ca\">Oracle Tutoring by Jack and Diane,<\/a> Campbell River, BC.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Maintaining a home computer requires frequent self-tutoring. The tutor shares. This Windows 7 computer no longer performs the COPY command from the mouse, so I use the command prompt to copy files, etc. Lately I&#8217;ve been backing up directories, which &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/www.oracletutoring.ca\/blog\/windows-home-computer-use-command-prompt-file-operations-xcopy\/\"> <span class=\"screen-reader-text\">Windows, home computer use: command prompt file operations: xcopy<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2295,1073,2771,1009,626,1,1141],"tags":[2770,2769],"class_list":["post-30523","post","type-post","status-publish","format-standard","hentry","category-computer-maintenance","category-computer-skills","category-file-maintenance","category-home-computer-use","category-microsoft-windows","category-uncategorized","category-windows-2","tag-xcopy-s-vs-xcopy-e","tag-xcopy-command-prompt"],"_links":{"self":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/30523","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/comments?post=30523"}],"version-history":[{"count":94,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/30523\/revisions"}],"predecessor-version":[{"id":30617,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/30523\/revisions\/30617"}],"wp:attachment":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/media?parent=30523"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/categories?post=30523"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/tags?post=30523"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}