Hello -
I am trying to create a WB script that searches for and then deletes all files with an .nsf extension. Thus far my script has the unfortunate aspect of running, and running up to 28% CPU usage. My question for anyone out here is does anyone have a way to limit the search function to only search for local drives and delete things by a wildcard reference?
Ex.;
AddExtender("wsrch34i.dll")
drives=DiskScan(2)
drvnum=ItemCount(drives,@TAB)
bakcount=0
baksize=0
For d=1 To drvnum
drv=ItemExtract(d,drives,@TAB)
;BoxOpen("Checking %drv% drive","")
drvroot=StrCat(drv,"\")
handle=SrchInit(drvroot,"*.nsf","","",16)
While 1
bakfile=SrchNext(handle)
If bakfile=="" Then Break
bakcount=bakcount+1
baksize=baksize+FileSize(bakfile)
;BoxText("%bakfile% deleted")
FileDelete(bakfile)
EndWhile
SrchFree(handle)
Next
Exit