How come Quicktime plays .avi files but iTunes doesn't? I think I might be missing something but it seems like Quicktime is happy playing my .avi movies but iTunes isn't. So I have to go through the rigmarole of converting .avi to .mp4 with iTunes before viewing in iTunes or on my iPod Touch. This of course means I end up with two versions of the same file (three if I need to view on iPod). Is there some solution to the issue? I'm going to have to buy yet another portable hard drive before the month is out ...
As per this MacRumors forum post:


  There are three ways to get .avi files to load into the iTunes library, these are packaging it in a supported format (QT-Pro workaround), adding extra entries to the CFBundleDocumentTypes (may cause problems when updating iTunes) or adding the movie-type meta-data to the file. Adding the movie-type meta-data to the file is the quickest, easiest and safest of all of these options (IMHO).


He then outlines a method to add the movie-type metadata.

in Terminal (requires Dev Tools)

$ SetFile -t "MooV" /path/to/movie.avi


Then run this Applescript:

tell application "Finder"
   set file type of file this_file to "MooV"
end tell


The original post I linked above has a full Applescript droplet or Folder Action that could do this automatically.