WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Files and Directories

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Fast File Count


#definefunction udfCntFiles()
c = itemcount(fileitemize('*.*'), @tab)
d = diritemize('*.*')
while d!=''
dirchange(itemextract(1, d, @tab))
c = c + udfCntFiles()
dirchange('..')
d = itemremove(1, d, @tab)
endwhile
return c 
#endfunction 

logdisk('c:')
dirchange('\')

start = gettickcount()
udfCnts = udfCntFiles()
Time = (gettickcount()-start)
pause(`DEBUG PAUSE`, strCat(`udfCnts = `, udfCnts, @CRLF, `Time = `, Time, @CRLF)) ;***DEBUG LINE***

Article ID:   W16249
File Created: 2004:03:30:15:43:34
Last Updated: 2004:03:30:15:43:34