I often forget to copy my Pocket Word documents to my desktop when syncing my Pocket PC. To get around this, I wrote a simple script that is run every one minute from cron. If the Pocket PC is connected, it copies my files, tells me, and exits. If the device is not connected, it exits harmlessly. This works great if you have Missing Sync set up to mount and sync on connect. Now I know I always have the latest copy of my work on my desktop.
Warning: This assumes you always edit on your PocketPC and it will overwrite the copies on your desktop. Work needed to extend the script to use timestamps to figure out which copy has been edited last, and overwrite the older one (a truer sync) has not been done.
#!/bin/sh
# cp_ppc_files.sh
#
#
COPY_FROM=/Volumes/PocketPC/Flash\ ROM\ Disk/Personal/
COPY_TO=~/Desktop/pocket_pc_docs
COMPLETE_MSG="Pawkett P C sync complete"
MOUNT_POINT=/Volumes/PocketPC
#
# if the directory doesn't exist, we're not mounted
#
if [ -e "${COPY_FROM}" ]
then
#
# we're good to go, copy everything we said we wanted
#
cp -r "${COPY_FROM}" ${COPY_TO}
#
# when run from cron, the unmount fails for me.
# probably many ways around this, but I just click "unmount"
# when I hear the complete_msg
#
umount ${MOUNT_POINT}
if [ "${COMPLETE_MSG}" != "" ]
then
say ${COMPLETE_MSG}
fi
fi
[robg adds: I haven't tested this one...]
Mac OS X Hints
http://hints.macworld.com/article.php?story=20041112071233665