Do you know where your variables are? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
This is as much a question as a statement as I don't have access to a network on which to test this properly... Perhaps someone could verify it. There seems to be one caveat with jsprat's technique. It works brilliantly provided the share is sharing the root of the remote drive, and not some subset of it. However, if the share represents a subdir on the actual remote drive, the information returned by the GetDrive() call represents the entire drive rather than just the shared portion of it. Or at least it appears to in my tests using local shares. There is an alternative FileSystemObject call, GetFolder()->size(), which will return the correct information, but I think that it is doing a recursive descent accumulating filesizes as it goes, and so is possibly not much quicker than using this technique in Perl. Anyway, here are the results I got when I shared my perl directory, e:\perl as \\mymachine\perl f:
I was intending to try and benchmark the two methods, but it appears to cache the value after the first call and i couldn't see any simple way of clearing the cache without rebooting, so I'll leave that to Ozzy Cor! Like yer ring! ... HALO dammit! ... 'Ave it yer way! Hal-lo, Mister la-de-da. ... Like yer ring! In reply to Re: Find A Share size in Win2k
by BrowserUk
|
|