Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- ###############################################################################################
- ###############################################################################################
- ###############################################################################################
- ###### This script will help to convert the Microsoft outlook PST file ##########
- ###### into Thunderbird/Evolution compatible format ##########
- ###### On Debian/Ubuntu based Distro's ##########
- ###### ##########
- ###### Original Script created by Srijan Kishore ##########
- ###### Modified Script by Steve Lloyd ##########
- ###### ##########
- ###############################################################################################
- ###############################################################################################
- ###############################################################################################
- #OS check
- cat /etc/debian_version > /dev/null
- if [ $? != 0 ]; then
- gdialog --title "OS check" --msgbox "You are not using Debian/Ubuntu, Install readpst package from http://www.five-ten-sg.com/libpst/rn01re01.html" 200 150
- else
- # Check to see if readpst is installed and install it if not.
- readpst -V > /dev/null
- if [ $? != 0 ]; then
- sudo apt-get update
- sudo apt-get -y install readpst
- fi
- fi
- # Make a folder called outlook in user's home directory
- mkdir ~/outlook
- #File selection
- readpst -o ~/outlook -r `zenity --file-selection`
- find ~/outlook -type d | tac | grep -v '^~/outlook$' | xargs -d '\n' -I{} mv {} {}.sbd
- find ~/outlook.sbd -name mbox -type f | xargs -d '\n' -I{} echo '"{}" "{}"' | sed -e 's/\.sbd\/mbox"$/"/' | xargs -L 1 mv
- #Script Completion
- find ~/outlook.sbd -empty -type d | xargs -d '\n' rmdir
- # Output a text box of completion
- zenity --info --width 800 --title "Outlook Mail Pst Conversion complete" --text "Your outlook Mail pst conversion is now complete, cut and paste the folder outlook.sbd from your home directory into the Local Folder in Thunderbird or Evolution and you can use the folders from there"
Add Comment
Please, Sign In to add comment