rm -r output
mkdir output
for mdbfile in $(ls input); do
	dbname=$(echo $mdbfile | cut -f 1 -d '.')
	mkdir output/$dbname
	mkdir output/$dbname/schema
	mkdir output/$dbname/inserts

	echo "Generating schema for $mdbfile"
	mdb-schema input/$mdbfile sqlite > output/$dbname/schema/$dbname.sql
	for table in $(mdb-tables input/$mdbfile); do
		echo "Generating inserts for $dbname::$table"
		mdb-export -D "%Y-%m-%d %H:%M:%S" -I sqlite input/$mdbfile $table > output/$dbname/inserts/$table.sql
	done
done


rm -r output
mkdir output
for mdbfile in $(ls input); do
	dbname=$(echo $mdbfile | cut -f 1 -d '.')
	mkdir output/$dbname
	mkdir output/$dbname/schema
	mkdir output/$dbname/inserts

	echo "Generating schema for $mdbfile"
	mdb-schema input/$mdbfile sqlite > output/$dbname/schema/$dbname.sql
	for table in $(mdb-tables input/$mdbfile); do
		echo "Generating inserts for $dbname::$table"
		mdb-export -I sqlite input/$mdbfile $table > output/$dbname/inserts/$table.sql
	done
done


--- 
+++ 
@@ -10,7 +10,7 @@
 	mdb-schema input/$mdbfile sqlite > output/$dbname/schema/$dbname.sql
 	for table in $(mdb-tables input/$mdbfile); do
 		echo "Generating inserts for $dbname::$table"
-		mdb-export -I sqlite input/$mdbfile $table > output/$dbname/inserts/$table.sql
+		mdb-export -D "%Y-%m-%d %H:%M:%S" -I sqlite input/$mdbfile $table > output/$dbname/inserts/$table.sql
 	done
 done
 
Update script to properly handle converting datetimes to a valid sqlite format.
