Are you using Windows Media Player to play the avi's.
Windows Media Player keeps a list of recently opened files.this can prevent files from being deleted because they are still associated with the media player.
Open regedit and navigate to the following string;

HKEY_CURRENT_USER\Software\Microsoft\MediaPlayer\
Player\RecentFileList

Delete all the entries from the recent file list,and you should now be able to delete the files.