I think it has to do with windows explorer holding the files and thus causing them not to be able to delete. When using the "cmd" approach, you no longer have windows explorer running directly on the files you want to delete.

As for the types of AVI files that become undeletable, I haven't the foggiest idea.