What kind of TiVo do you have? If you have a SD Directv Tivo, you can use
TivoServer. It automatically formats avi, or mpeg files while it's transferring to the Tivo.
If you can't use TivoServer, or you're looking for something different, rbautch has a nice little .bat file you can use with a version of ffmpeg that converts to the ty format. His .bat file will automate much of what you want to do. This can all be found at the other forum, and can't be discussed in detail here. Search for threads started by rbautch, and you'll find some interesting stuff.