Backup win7 profile error logs
Posted: 30 Jun 2011 12:34
I want to backup an Errors folder that is contained in each user profile for about 40 computers and an unknown number of users. I am new to this and would appreciate it if someone can point me in the right direction. It is the %username% variable that eludes me. How can I get it to backup the errors folder for multiple profiles without specifying a username?
@echo off
:: variables
set drive=C:\Backup
set backupcmd=xcopy /s /c /d /e /h /i /r /k /y
%backupcmd% "\\testcomp1\C$\Users\%username%\AppData\Roaming\prog1\SiteFiles\Errors" "%drive%\testcomp1 - prog1 Errors"
echo Backup Complete!
@pause
@echo off
:: variables
set drive=C:\Backup
set backupcmd=xcopy /s /c /d /e /h /i /r /k /y
%backupcmd% "\\testcomp1\C$\Users\%username%\AppData\Roaming\prog1\SiteFiles\Errors" "%drive%\testcomp1 - prog1 Errors"
echo Backup Complete!
@pause