Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to implement such code into my following backup batch file....see below. Any idea would be most appreciated. Thanks in advance!

mkdir      "%USERPROFILE%\Desktop\Backup-%USERNAME%\" 
pushd %~dp0 
copy       "\Restore - Desktop.bat" "%USERPROFILE%\Desktop\Backup-%USERNAME%\" > "%USERPROFILE%\Desktop\Backup-%USERNAME%\COPYLOG.txt" /np
echo        %USERNAME%-%COMPUTERNAME% :: %DATE% :: %TIME% >            "%USERPROFILE%\Desktop\Backup-%USERNAME%\COPYLOG.txt"
echo        Thanks to: <Your Name Here> (E-level Dev) >>                  "%USERPROFILE%\Desktop\Backup-%USERNAME%\COPYLOG.txt"
      net use >  "%USERPROFILE%\Desktop\Backup-%USERNAME%\SHARES.txt"
  robocopy "%USERPROFILE%\Favorites"       "%USERPROFILE%\Desktop\Backup-%USERNAME%\Favorites"      /s "/LOG+:%USERPROFILE%\Desktop\Backup-%USERNAME%\COPYLOG.txt" /np
  robocopy "%USERPROFILE%\Links"           "%USERPROFILE%\Desktop\Backup-%USERNAME%\Links"             "/LOG+:%USERPROFILE%\Desktop\Backup-%USERNAME%\COPYLOG.txt" /np
  robocopy "%USERPROFILE%\Downloads"       "%USERPROFILE%\Desktop\Backup-%USERNAME%\Downloads"         "/LOG+:%USERPROFILE%\Desktop\Backup-%USERNAME%\COPYLOG.txt" /np
  robocopy "%USERPROFILE%\Contacts"        "%USERPROFILE%\Desktop\Backup-%USERNAME%\Contacts"          "/LOG+:%USERPROFILE%\Desktop\Backup-%USERNAME%\COPYLOG.txt" /np
  robocopy "%USERPROFILE%\Documents"       "%USERPROFILE%\Desktop\Backup-%USERNAME%\Documents"      /s "/LOG+:%USERPROFILE%\Desktop\Backup-%USERNAME%\COPYLOG.txt" /np
  robocopy "%USERPROFILE%\Music"           "%USERPROFILE%\Desktop\Backup-%USERNAME%\Music"          /s "/LOG+:%USERPROFILE%\Desktop\Backup-%USERNAME%\COPYLOG.txt" /np
  robocopy "%USERPROFILE%\Pictures"        "%USERPROFILE%\Desktop\Backup-%USERNAME%\Pictures"       /s "/LOG+:%USERPROFILE%\Desktop\Backup-%USERNAME%\COPYLOG.txt" /np
  robocopy "%USERPROFILE%\Videos"          "%USERPROFILE%\Desktop\Backup-%USERNAME%\Videos"         /s "/LOG+:%USERPROFILE%\Desktop\Backup-%USERNAME%\COPYLOG.txt" /np
  cscript  "%SYSTEMROOT%\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs" -g >> "%USERPROFILE%\Desktop\Backup-%USERNAME%\PRINTERS.txt"
share|improve this question

migrated from stackoverflow.com Apr 26 '13 at 7:55

This question came from our site for professional and enthusiast programmers.

    
so when you have tried it what was the error –  Satya Apr 26 '13 at 4:10
    
I actually haven't tried implementing any code into the script to do so. It was an idea that was passed on to me. And now I'm trying to figure out how to go about it. –  k3i Apr 26 '13 at 4:11
    
please try and let us know the errors, that way we can understand better and troubleshoot it –  Satya Apr 26 '13 at 4:12
    
ok. I'll test it. –  k3i Apr 26 '13 at 4:13
    
Robocopy has the /L switch to only produce a list of the files copied, and that includes a total filesize. You would have to parse the list to extract the size and add them up. –  foxidrive Apr 26 '13 at 5:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.