Dim loDirectory As New DirectoryInfo(Mid(lcTemp, 1, Len(lcTemp) - 1)) Dim loFile As FileInfo For Each loFile In loDirectory.GetFiles() Framework.DeleteFile(lcTemp + loFile.Name) NextBut, this is removing all files. While I can check for the extension before deleting the file, I would like to For Each loop to only loop for .html files. Is there a way to have the loDirectory to be initialized for a specific extension only?