> If you don't mind, could you walk through the script to explain what
> each line does. I understand it until the .new section. I appreciate
> you  posting the script, we are looking for the exact same thing for
> our customers. Thank you for your time and effort.

You're welcome.

Here's a commented version:

EXPIRE.BAT
----------

FOR /F %%J IN ('echo %1') DO MOVE /Y %%~dpnJ.uid c:\imail\exptemp       //move index 
to working folder
FOR /F %%J IN ('echo %1') DO MOVE /Y %%~dpnJ.mbx c:\imail\exptemp       //move mailbox 
to working folder
C:\IMAIL\IMMSGEXP -tc:\imail\exptemp -d21                               //run expiry 
utility
IF EXIST %1 REN %1 %1.new                                               //if new 
messages delivered during expiration, reserve new messages in separate mailbox to 
prevent overwriting
FOR /F %%K IN ('echo %1') DO MOVE /Y c:\imail\exptemp\*.* %%~dpK        //move index 
and mailbox back to original location
IF EXIST %1.new COPY /Y /B %1+%1.new %1                                 //if new 
messages, concatenate old and new mailboxes under old name (UID will recreate at next 
access)
IF EXIST %1.new DEL %1.new                                              //delete new 
message mailbox

----------

-Sandy


To Unsubscribe: http://www.ipswitch.com/support/mailing-lists.html
List Archive: http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
Knowledge Base/FAQ: http://www.ipswitch.com/support/IMail/

Reply via email to