DivFix++ is a freeware, cross platform application for Windows, Linux and Mac OS X based computers that can repair broken or partially downloaded incomplete DivX-encoded AVI movie files by rebuilding the index part of the file.
One can fix a file to a temporary location, preview it with a media player, than delete the temporary movie file automatically after preview using command line parameters.

Download from here