Foulweb

outlook PST file

Jul 22nd, 2020 (edited)
1,479
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 2.33 KB | None | 0 0
  1.  #!/bin/bash
  2. ###############################################################################################
  3. ###############################################################################################
  4. ###############################################################################################
  5. ######          This script will help to convert the Microsoft outlook PST file      ##########
  6. ######                    into Thunderbird/Evolution compatible format               ##########
  7. ######                         On Debian/Ubuntu based Distro's             ##########
  8. ######                                 ##########
  9. ######                    Original Script created by Srijan Kishore                  ##########
  10. ######                         Modified Script by Steve Lloyd                        ##########
  11. ######                                 ##########
  12. ###############################################################################################
  13. ###############################################################################################
  14. ###############################################################################################  
  15.  
  16. #OS check
  17. cat /etc/debian_version > /dev/null
  18. if [ $? != 0 ]; then
  19.  
  20. 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
  21.  
  22. else
  23.  
  24. # Check to see if readpst is installed and install it if not.
  25.  
  26. readpst -V > /dev/null
  27.           if [ $? != 0 ]; then
  28.  
  29.     sudo apt-get update
  30.     sudo apt-get -y install readpst
  31.     fi
  32. fi
  33.  
  34. # Make a folder called outlook in user's home directory
  35.  
  36. mkdir    ~/outlook
  37.  
  38. #File selection
  39.  
  40. readpst  -o  ~/outlook  -r  `zenity --file-selection`
  41.  
  42. find ~/outlook -type d | tac | grep -v '^~/outlook$' | xargs -d '\n' -I{} mv {} {}.sbd
  43.  
  44. find ~/outlook.sbd -name mbox -type f | xargs -d '\n' -I{} echo '"{}" "{}"' | sed -e 's/\.sbd\/mbox"$/"/' | xargs -L 1 mv
  45.  
  46.  
  47. #Script Completion
  48.  
  49. find ~/outlook.sbd -empty -type d | xargs -d '\n' rmdir
  50.  
  51. # Output a text box of completion
  52.  
  53. 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