Use the script below to find and delete files according to their extensions.
strComputer = "."Set objWMIService = GetObject("winmgmts:" _& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")Set colFiles = objWMIService.ExecQuery _("Select * from CIM_DataFile where Extension = 'mp3' OR Extension = 'mp4'")For Each objFile in colFilesobjFile.DeleteNext
Monday, April 6, 2009
Search and Delete Files on Windows Domain Structure
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment