Amount of files on a drive?
G. Willoughby
sab at NOSPAM.freeuk.com
Tue Feb 5 10:56:57 EST 2002
i am using this at the minute:
------------------------------------------------------------------
import win32api
import string
import os
def countFiles(arg, dir, files):
for file in files:
count=count+1
fileListings=[]
driveList=string.split(win32api.GetLogicalDriveStrings(),'\0')[:-1]
for drive in driveList:
os.path.walk(drive, countFiles, 0)
------------------------------------------------------------------
but its pretty slow any other suggestion how i could speed it up??
G. Willoughby
"G. Willoughby" <sab at NOSPAM.freeuk.com> wrote in message
news:a3m9d3$mr4$1 at newsg2.svr.pol.co.uk...
> Is there a fast an easy way to get the number of files on a drive??
> ta,
> G. Willoughby
>
>
More information about the Python-list
mailing list