Page 1 of 1

Backup win7 profile error logs

Posted: 30 Jun 2011 12:34
by challengerRT
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

Re: Backup win7 profile error logs

Posted: 30 Jun 2011 12:37
by Cleptography
This has no relevance to your question but I am just curious. Are you a sysadmin?

Re: Backup win7 profile error logs

Posted: 30 Jun 2011 12:42
by challengerRT
I do work in IT but not really a sys admin. Just trying to gather some data and fix some issues.