Created
May 17, 2017 14:15
-
-
Save wannadrunk/4a85c6ef30bca05f8faad6e0704e5119 to your computer and use it in GitHub Desktop.
Backup current user profile data to storage which run this script. The script requires robocopy.exe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Echo off | |
cls | |
Echo. | |
Echo. | |
Echo.This is going to copy your data from | |
Echo. | |
Echo. - "%userprofile%" | |
Echo. | |
Echo.to this external device under folder "%computername%" | |
Echo. | |
pause | |
Echo. | |
Echo. | |
Echo.Backup the log files | |
if exist %username%-4.log del %username%-4.log | |
if exist %username%-3.log ren %username%-3.log %username%-4.log | |
if exist %username%-2.log ren %username%-2.log %username%-3.log | |
if exist %username%-1.log ren %username%-1.log %username%-2.log | |
if exist %username%.log ren %username%.log %username%-1.log | |
Echo.Start to copy your data ... | |
Echo. | |
Echo. | |
robocopy "%USERPROFILE%" ".\%computername%\%username%\Profile" /e /z /r:0 /np /log:%username%.log /tee /xd google temp downloads download "Temporary Internet Files" cache caches "Internet Explorer" "Media Player" ".dropbox.cache" ".gimp-2.8" "Microsoft" "Research In Motion" "Adobe" appdata | |
start notepad %username%.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment