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
Backup win7 profile error logs
Moderator: DosItHelp
-
- Posts: 287
- Joined: 16 Mar 2011 19:17
- Location: scriptingpros.com
- Contact:
Re: Backup win7 profile error logs
This has no relevance to your question but I am just curious. Are you a sysadmin?
-
- Posts: 2
- Joined: 30 Jun 2011 10:24
Re: Backup win7 profile error logs
I do work in IT but not really a sys admin. Just trying to gather some data and fix some issues.