It's missing this script...
http://www.qsl.net/kb9mwr/wapr/tcpip/encapconvertnew.pl.txt
The two scripts Jerry posted grab the encap file and then feeds it into the
router via telnet (respectively). What's missing in the first script is
translating the encap.txt into route commands which the above will do.