#!/bin/bash rm ./batch_sql/*.sql > /dev/null rm ./txt/*.txt > /dev/null ./batch/transfer.sh echo echo "Transfer Complete" echo #echo Sort files for good measure... #./batch/sort_files.pl txt/* #convert from UTF16 to UTF8 for file in $(ls txt/*.txt|grep -v bes|grep -v mailbox_sizes.txt) do echo converting file: $file ./batch/unicode.pl $file > "$file"_uni.txt done echo Sort files for good measure... ./batch/sort_files.pl txt/*.txt echo parse_allExchange.pl ./batch/parse_allExchange.pl txt/all_exchange.txt_uni.txt_sorted.txt >> batch_sql/0all_exchange.sql echo parse_mailboxes.pl ./batch/parse_mailboxes.pl txt/mailbox_sizes.txt_sorted.txt >> batch_sql/1mailbox_sizes.sql echo parse_bes.pl ./batch/parse_bes.pl txt/besusers.txt_sorted.txt >> batch_sql/2besusers.sql echo parse_disabled.pl ./batch/parse_disabled.pl txt/disabled_exchange.txt_uni.txt_sorted.txt >> batch_sql/3disabled_exchange.sql echo parse_id.pl ./batch/parse_id.pl txt/id_exchange.txt_uni.txt_sorted.txt >> batch_sql/4id_exchange.sql echo parse_samid.pl ./batch/parse_samid.pl txt/samid_exchange.txt_uni.txt_sorted.txt >> batch_sql/5samid_exchange.sql echo parse_ou.pl ./batch/parse_ou.pl txt/all_exchange.txt_uni.txt_sorted.txt >> batch_sql/6ou_exchange.sql echo parse_lastLogon.pl ./batch/parse_lastLogon.pl txt/lastlogon_exchange.txt_uni.txt >> batch_sql/7lastlogon.sql echo parse_lastExchangeLogon.pl ./batch/parse_lastExchangeLogon.pl txt/mailbox_sizes.txt_sorted.txt >> batch_sql/8lastExlogon.sql echo parse_quota.pl ./batch/parse_quota.pl txt/quota_exchange.txt_uni.txt_sorted.txt >> batch_sql/9quotaEx.sql echo prepare_db.sh ./batch/prepare_db.sh echo load_db.sh ./batch/load_db.sh