@echo off
echo "MM2Pilot"
rem 	Convert MM data to pilot
rem 	Customize the fields below as appropriate, and add link to
rem	this .bat file into your menu.  The places to customize
rem	are marked by the line of asterix's below it.


rem 	First copy in the export.txt file
copy "C:\Program Files\MM\export.txt" export.txt
rem   *******************************  
rem     This is the location of your MM export.txt file


rem 	Now, Delete it so that next time, we won't have to replace it
del "C:\Program Files\MM\export.txt"
rem  ******************************


rem 	Now convert to new DB style - perl code uses hardcoded file names
rem	export.txt = input,  convdb.txt = output
perl MM2Pilot


rem 	Now convert to pilot DB (specify alarm option if desired)
convdb convdb.txt


rem 	Now, Copy back to pilot DB 
rem	(MM is master - so we overwrite the pilot's datebook.dat)
copy output.dba "C:\Program Files\PalmPilot\BaederS\datebook\datebook.dat"
rem              ***********************************

rem 	Clean up before we exit - you can leave the files around
rem	to look at the debug output
del export.txt 
del convdb.txt 
del output.dba