Amount of files on a drive?
G. Willoughby
sab at NOSPAM.freeuk.com
Tue Feb 5 10:56:57 EST 2002
More information about the Python-list mailing list
Tue Feb 5 10:56:57 EST 2002
- Previous message (by thread): HappyDoc: Can't get output
- Next message (by thread): Amount of files on a drive?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
>
>
- Previous message (by thread): HappyDoc: Can't get output
- Next message (by thread): Amount of files on a drive?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list