Making the OST file contiguous



This program makes the OST into one contiguous file, it essentially defrags a single file.

The OST file is local copy of the mailbox in Outlook.

Make sure you have closed outlook before running this program (the program will kill outlook if it is running)

Here is the autoit code:

ProcessClose("OUTLOOK.EXE")
ProcessClose("Communicator.exe")
ProcessWaitClose("OUTLOOK.EXE")
ProcessWaitClose("Communicator.exe")
FileCopy ( "./contigbat.bat", "c:\windows", 1 )
MsgBox(4096,"Defrag the OST file", "You are about to make the Outlook OST file contiguous")
RunWait (@ComSpec & " /c " & ‘contigbat.bat’, "", @SW_MAXIMIZE )

and here is the batch file called contigbat.bat, just place these two files anywhere. Oh, this tool assumes you already have contig.exe tool installed in your path (like c:\windows or c:\windows\system32)

CD\
CLS
CONTIG -V "%userprofile%\Local Settings\Application Data\Microsoft\Outlook\*.OST"

@ECHO .
@ECHO .
@ECHO .
@ECHO .
@ECHO .

@ECHO LOOK ABOVE FOR REPORT, THEN PRESS THE SPACEBAR
PAUSE

Advertisements

About Mike

owner of blog
This entry was posted in Exchange. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s