[Win32] HEEEEEEELLLLPPPP! I need to determine the cluster siz e on WinXP/NT/2k

Tim Golden tim.golden at viacom-outdoor.co.uk
Wed Apr 14 12:24:57 EDT 2004


>Hi!
>
>I need Your help. I implement a Python NT service and I need to
>determine (on WinXP/2k/XP) a cluster size of the particular partition
>(to find out how much space a file will occupy on that partition).

To make the obvious point, this is really a Win32 question
rather than (or at least as well as) a Python one. So, if
you haven't already, post to some suitable MS programming
groups.

Having said that, I've done pretty much the same research
as you seem to have done and have reached the (frankly
surprising) conclusion that there's no reliable way to
do this in software, even using WMI (which is often a
handy standby for these sorts of things). The only article
I can find that comes close to helping, suggests parsing
the output of chkdsk! (Well, it seems to work, but on my
Win2k machine you have to wait a while for it to get there).

Can you not determine the overall size of the disk, use
GetFreeDiskSpace if it's less than 2Gb and then use some
more desperate technique if it's over?

Good luck, and sorry I can't be any more use.

TJG


________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________




More information about the Python-list mailing list