@echo off
cd /D d:\MailBackup
set dst=%date:~0,4%%date:~5,2%%date:~8,2%
md backup_%dst%
cd /D c:\MDaemon\Public Folders\Mail Archive.IMAP\
xcopy . d:\MailBackup\backup_%dst% /s /e /y
cd /D C:\MDaemon\Public Folders\Mail Archive.IMAP\Inbound to.IMAP
del . /Q
cd /D C:\MDaemon\Public Folders\Mail Archive.IMAP\Outbound from.IMAP
del . /Q