With the GetFiles functions, the result is not an array of strings right? If I'm not mistaken My.Computer.FileSystem.DeleteFile() takes a string. If you use TMPfile.FileName it may work? Also, Nightwalker83 makes a good point with the use of On Error Resume Next. Maybe use try/catch as an alternative? At least it lets you know what type of errors you're dealing with.

~mshamory