Posted by & filed under Software, Windows, XP.

Over the years I’ve used all sorts of various scripts to automate mundane processes and backup procedures. Today I’m sharing a simple .bat file that xcopy’s 2 folders to a backup location. This script can easily be added to the windows scheduler to run at desired intervals.

@echo off
cls
set staffbackup=e:\NAS-BACKUP\staff
set groupbackup=e:\NAS-BACKUP\groups
 
set stafffiles=F:\NAS-BACKUP-WITH-ACL\staff
set groupfiles=F:\Aug22-NAS-BACKUP\groups
 
set backupcmd=xcopy /s /c /d /e /h /i /r /k /y
 
echo ### Starting Staff Backup Process
echo #
echo # Backing up %stafffiles% to %staffbackup%...
echo #
 
%backupcmd% "%stafffiles%" "%staffbackup%"
 
echo #
echo ### Staff Backup Process Completed!
echo #
 
echo ### Starting Groups Backup Process
echo #
echo # Backing up %groupfiles% to %groupbackup%...
echo #
 
%backupcmd% "%groupfiles%" "%groupbackup%"
 
echo #
echo ### Group Backup Process Completed!
echo #
 
echo #
echo #
echo ###############################################################
 
@pause

Nothing groundshattering, but definitely helps.

Leave a Reply

  • (will not be published)