The PC

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Monday, April 11, 2011

Backup Windows Part 3 -- xcopy

Posted on 6:02 PM by Unknown
Let's briefly discuss a quick way to backup Windows. I use a batch file that I wrote to quickly backup clients' PCs.

Here it is:

xcopy /c /d /e /h /i /r /y "%USERPROFILE%\Favorites" "%COMPUTERNAME%\%USERNAME%\Favorites"
xcopy /c /d /e /h /i /r /y "%USERPROFILE%\Desktop" "%COMPUTERNAME%\%USERNAME%\Desktop"
xcopy /c /d /e /h /i /r /y "%USERPROFILE%\My Documents" "%COMPUTERNAME%\%USERNAME%\My Documents"
xcopy /c /d /e /h /i /r /y "%USERPROFILE%\Documents" "%COMPUTERNAME%\%USERNAME%\Documents"
xcopy /c /d /e /h /i /r /y "%USERPROFILE%\AppData\Local\Microsoft\Outlook\*.pst"
xcopy /c /d /e /h /i /r /y "%USERPROFILE%\Local Settings\Application Data\Microsoft\Outlook\*.pst"

echo Backup Complete!
@pause


This quick script copies the user's Favorites, Desktop, My Documents(Documents in the case of Vista and Windows 7) and the Outlook .pst file.

This script will work for either XP or Vista/Windows 7. The /c switch tells xcopy to continue even if it confronts an error. Therefore, when running this script on Windows 7, xcopy simply moves on when it does not find the My Documents folder. Of course, the inverse is true when running the script on XP.

This can be used for migrations or as a regular backup. The /d switch tells xcopy to only copy files that have changed since a certain date. If no date is given, as above, only the files that have a newer source time than the destination will be copied.

Obviously, changes can be made to customize the script as needed. For instance, the entire user profile can be backed up. Also, additional folders, such as the Firefox profile, can be added.

I run this script from an external USB drive and all of the data is copied to that drive. Again, customize the script to copy files to a different location.

Be sure to type xcopy /? at a command prompt to learn what each switch does and also to learn about the switches not included in the above.

If you want to use the above backup script, copy and paste it into notepad and save it as backup.bat. Double-click the file and you're backing up.
Email ThisBlogThis!Share to XShare to Facebook
Posted in Backup, script, Vista, Windows, Windows 7, xcopy, XP | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • 30 Years in Review: My Experience With The History of Violence in Video Games
    For as long as I can remember playing video games, there has always been violence, whether it be inconsequential or direct, or merely abstra...
  • The Dark Knight Rises: A Worthy and Satisfying Conclusion
    I've  seen a lot of movies based on comic books over the years, and I've learned to spot the good stuff from the crap pretty easily....
  • Protecting Your PC From Malicious Software
    New threats are unleashed upon the internet each day. In this article, threats or malicious software (or malware) refer to a computer virus,...
  • Why Windows 8 Will Fail, at Least In the Desktop Market...
    Well many of you are probably windows users, in fact estimates are that around 90% of all computers are running Microsoft Windows . Of that,...
  • The Right of The People To Not Be Shot: An Examination of The 2nd Amendment.
    "A well regulated militia, being necessary to the security of a free state, the right of the people to keep and bear arms, shall not be...
  • Ulcers, Ulcers, Ulcers, I Hate Them.
    As some of you know I have Crohn's disease . If you're interested in knowing what it is just click on that link. But rather than com...
  • Backup Windows Part 1 -- Backup and Restore
    A couple of days ago was National Backup Day. Okay, we are a little late. Plus, a quick Google search will reveal several National Backup Da...
  • Why I am an Atheist (part four)
    This is part four of this article, here you can find parts one , two and three . Part IV: The Elegant Universe When I was a boy, I ...
  • Some of The Strangest Things in The Universe
    I thought in honor of Halloween, I might blog a little bit about the strange but true. I figured it might be fun to discuss some of the wack...
  • Changing Forgotten Window's Passwords
    Often times a user will forget their Windows login password. Of course, often times that user will be using the sole administrator account o...

Categories

  • 0-day
  • 2000
  • ACTA
  • Add-ons
  • Adele
  • Alanis Morissette
  • Amy Lee
  • Anonymous
  • antitrust
  • anycast
  • art
  • assholes
  • atom
  • Avril Lavigne
  • backbone
  • Backup
  • Batman
  • Bill Maher
  • biology
  • bittorrent
  • blood
  • Boot Problems
  • botnet
  • browser
  • censorship
  • children
  • clone
  • comic
  • congress
  • conservative
  • constitution
  • consumer
  • copy protection
  • copyright
  • corporatocracy
  • crack
  • crohn's
  • data-mining
  • DDOS
  • democracy
  • disease
  • DMCA
  • DNA
  • DNS
  • documentary
  • DRM
  • emotion
  • evolution
  • Facebook
  • FBI
  • federal
  • female
  • film
  • firewall
  • FISA
  • freedom
  • galaxy
  • games
  • God
  • government
  • hacker
  • higgs boson
  • Homeland Security
  • homosexuality
  • intellectual property
  • interface
  • internet
  • Internet Explorer
  • intestines
  • ipad
  • ISO
  • ISP
  • Jewel
  • kernel
  • Keyboard
  • Keyboard Shortcuts
  • liberal
  • loss aversion
  • mac
  • male
  • Malware
  • MegaUpload
  • meme
  • metro
  • microsoft
  • movie
  • MPAA
  • nature
  • NT
  • Office
  • open source
  • OS
  • oscdimg
  • Outlook
  • pain
  • particle
  • passwords
  • patent
  • PIPA
  • piracy
  • Poe
  • poetry
  • President
  • Printers
  • privacy
  • programming
  • progress
  • public domain
  • quantum mechanics
  • Recovery Console
  • red flag
  • religion
  • remix
  • replication
  • reproduction
  • RIAA
  • ribbon
  • rootkit
  • script
  • security
  • sex
  • singer
  • software
  • songwriter
  • SOPA
  • spore
  • spyware
  • star
  • supernova
  • Supreme Court
  • the big bang
  • tracking
  • trojan horse
  • tyranny
  • UBCD
  • ulcer
  • unintuitive
  • universe
  • upgrade
  • USB
  • violence
  • Virus
  • Vista
  • VPN
  • wars
  • White House
  • Windows
  • Windows 7
  • wiretapping
  • women
  • xcopy
  • xerox
  • XP

Blog Archive

  • ►  2013 (8)
    • ►  October (1)
    • ►  August (1)
    • ►  May (2)
    • ►  March (1)
    • ►  February (1)
    • ►  January (2)
  • ►  2012 (42)
    • ►  December (2)
    • ►  November (4)
    • ►  October (2)
    • ►  September (2)
    • ►  July (3)
    • ►  June (4)
    • ►  May (4)
    • ►  April (4)
    • ►  March (7)
    • ►  February (10)
  • ▼  2011 (7)
    • ▼  April (4)
      • Software Every PC Technician Needs
      • Backup Windows Part 3 -- xcopy
      • Backup Windows Part 2 -- Clonezilla
      • Backup Windows Part 1 -- Backup and Restore
    • ►  March (3)
  • ►  2010 (3)
    • ►  July (2)
    • ►  June (1)
  • ►  2009 (5)
    • ►  November (1)
    • ►  October (4)
Powered by Blogger.

About Me

Unknown
View my complete profile