A while ago I needed something to convert a 5GB Outlook OST file to PST format. Turned outAsposehas a good (commercial) API/library for Java to do exactly that. I had not touched Java for 10 years but got things sorted within a few hours thanks to clear instructions and good examples and docs. I just used the example and made minimal changes, nothing more.
Saving to Outlook 2013/2016 PST files is not supported
Get files below or fromReleases page
Jar and wrappers:
- Main executable:ost2pst.jar(verifySHA512SUMS)
- Windows batch file:ost2pst.bat
- Linux/BSD shell script:ost2pst.sh
If you need to install Java use your OS package manager or download it here:JRE8+or alternativelyJavaSE-RE-8+.
- Windows:
ost2pst.bat <input.ost> <output.pst>
- Linux:
ost2pst.sh <input.ost> <output.pst>
Or run the jar directly:java -jar ost2pst.jar <input.ost> <output.pst>
Remember you need to have at least JRE8 installed, OpenJDK is untested but should work
C:\src\ost2pst>ost2pst.bat input.ost output.pst
OST2PST (210619)
INFO: Fileformatis"64-bit Unicode"(23)
INFO: Loading file"input.pst"(5GB)
Folder [00]"Public"
Folder [01]"Inbox"
Folder [02]"Outbox"
Folder [03]"Sent Items"
INFO: Converting"input.pst"to"output.ost"511MB/4751MB (11%)|
Import intoEclipse:
- GitHub Aspose Email-for-Java
- docs.aspose Installation (Maven)
- docs.aspose Aspose.Email java for Eclipse (Maven)
- use Ant to 'Export', 'Java', 'Runnable JAR file' (used forost2pst.jar)
- or alternatively use Maven to build project
Add new option that tries to read corrupted ost/pst files. Seeherefor more info.
C:\src\ost2pst>ost2pst.bat -c broken.ost
- fixed file size formatting:programming.guide:)
- updated aspose-email lib to 21.5
- removed aspose-email submodule from git repo
- show file format info
- exits instead of trying to save outlook 2013+ files
- jar also builds in maven now
- error handling, added notice about outlook '13/16 files
- updated aspose-email lib to 20.2
- fixed (visual) error before convertion
- improved messages and progress indicator
- updated aspose-email lib to 19.12
- improved progress indicator
- updated aspose-email lib to 18.8
- Aspose.Email for Java:https://products.aspose /email/java
- What lead me to Aspose:http://wiki.opf-labs.org/pages/viewpage.action?pageId=25887031
- Possible alternativehttps://github /rjohnsondev/java-libpst
moved from old repo mkorthof/Aspose.Email-for-Java