Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Const adVarChar = 200 Const adDate = 7 ipreserve=1 '# of files to preserve sfolderpath="d:\temp" 'your path to the folder set fso=createobject("scripting.filesystemobject") if not fso.folderexists(sfolderpath) then set fso=nothing wscript.echo "The folder does not exist." & vbcrlf & sfolderpath & vbcrlf & "Operation aborted." wscript.quit end if set ofolder=fso.getfolder(sfolderpath) set rs = createobject("ador.recordset") with rs.fields .append "filepath",adVarChar,255 .append "datelastmodified",adDate end with with rs .open for each ofile in ofolder.files .addnew array("filepath","datelastmodified"), array(ofile.path,ofile.datelastmodified) .update next end with icount=0 if not (rs.eof and rs.bof) then rs.sort="datelastmodified desc" rs.movefirst do while not rs.eof icount=icount+1 if icount>ipreserve then on error resume next fso.deletefile rs.fields("filepath"),true on error goto 0 end if rs.movenext loop end if set rs=nothing set ofolder=nothing set fso=nothing
Add your voice to the tech community where 5M+ people just like you are talking about what matters.