RDR-IT » Scripts » Vbs : delete all files with the same extension in a folderVbs : delete all files with the same extension in a folder 1 April 2021 - Romain - (0) - 1 minute The next two lines of code allow you to delete all files with a particular extension in a folder. Set obj = CreateObject("Scripting.FileSystemObject") obj.DeleteFile("C:\Windows\*.log")The example below will delete all of the .log files from the C:\Windows folder.Vbs : delete files by extension in folder General Files , vbs Similar articles