Menu Content/Inhalt
Home arrow Howtos arrow Windows Command Line Tips arrow Howto: Back up files to another computer using the Windows Command Line
Howto: Back up files to another computer using the Windows Command Line Print E-mail
Written by Josh   
Friday, 10 November 2006

HOWTO:

Back up any files to another computer using the Windows command line

Say you have a directory with files and sub directories you would like to back up to another computer on your LAN.  Try the following command from a Windows command line:

  1. Make sure your computers on your network are running Windows (preferably XP), have File and Printer Sharing enabled, and any firewalls set to allow File and Printer Sharing.
  2. Click on Start -> Control Panel -> System.  Click on the Computer Name tab at the top of that window.  Type in a computer name and something descriptive but not longer than 12 characters and make it easy to remember.  In the Workgroup field, type in either MSHOME or WORKGROUP as those are easy to remember and are two common default workgroup names.  Click okay and restart your computer.  Follow this same procedure on each computer on your LAN.  Make sure you use a different computer name for each computer.
  3. The easiest way to share files across multiple computers is to create a dummy account on each computer, named files and a password of files.  This account will be exclusively used for file sharing and not logging into the computer.  Click on Start -> Control Panel -> User Accounts.  Click on Create a New Account.  Type in files for the name of the account and click on next.  Make sure Computer Administrator is selected and then click on Create Account.  Now we need to set a password for that account by clicking on Create a Password.  Type in files for the password.  The password hint is optional and not needed.  Click on okay.  Follow this same procedure on each computer on your LAN.
  4. Now to set up file shares.  Click on Start -> My Computer.  Open a drive you wish to use to share files.  Now create a new directory (or you can use an existing directory if you wish).  Once the directory is created, right click on it -> Sharing and Security.  Click on Share this folder.  Type in a share name you wish to use.  Keep it short and easy to remember.  Spaces are allowed, but it is easier to not have them.  Now click on Permissions.  Highlight and remove any account or group listed there.  Now click on Add.  Type in Administrators in the object field.  Click okay.  Check off Full Control.  Click on Add again.  Type in files in the object field.  Click okay.  Check Full Control if you want to be able to write files to this folder over the network.  Otherwise leave it as Read permissions.  Click okay.  The share has now been setup.  Follow the same procedure on each computer on your LAN.
  5. To access these file shares across your network, Click Start -> My Computer.  Select Tools -> Map a Network Drive.  Change the drive letter to a letter that you wish to use for backing up and accessing those backed up files.  Under folder, click Browse.  Next find the other computer on your network that you wish to back up the files to.  Then double-click on the share you wish to back up to.  Then click on Okay.  You should now be able to see that mapped computer as a drive in My Computer.  Verify that it is there and that you can write files to it.
  6. Now to copy files automatically across the network.  Click on Start -> Run.  Type in cmd and hit enter.  You should now be at the command line.
  7. Type in xcopy /e /v /f /y /r /d c:\filestobebackedup\*.* z:\backedupfiles\ > c:\log.txt and hit enter. C: can be whatever drive and folder you wish to copy files from.  Z: is the drive letter that was assigned in Step 5.  Backedupfiles is the name of the fileshare from Step 4. C:\log.txt can be on any drive you wish, and any folder you wish, simply by changing the location.
  8. Type in "exit" to close the command line.  Your files should now be in on the second computer.
Last Updated ( Saturday, 29 December 2007 )
 
< Prev   Next >