in reply to Out of memory.
The problem is that you are shelling out and doing a dir /s of an entire drive in order to extract the size from the second from last line.
Even on my half empty 2GB boot partition, this results in 1.5 MB of data and 36,000 lines!
On a share that points to a well used 40GB drive with compression enabled, this could easily lead to a list of files of several 10s of MB and 200,000 lines or more. Pulling all this data across the network and into an anonymous list just to find out the amount of space used on a remote share is ... well more than just slightly profligate.
There are a number of vastly more efficient ways (in terms of memory, time and network load) of getting this information. The question has comes up at least three times in the last week or so, including this one. A Super search for "disk usage" or "share size " should turn up several more.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Out of memory.
by blackadder (Hermit) on Jul 23, 2003 at 09:23 UTC | |
by BrowserUk (Patriarch) on Jul 23, 2003 at 11:24 UTC | |
by Aristotle (Chancellor) on Jul 23, 2003 at 11:54 UTC | |
by BrowserUk (Patriarch) on Jul 23, 2003 at 12:19 UTC | |
by Aristotle (Chancellor) on Jul 23, 2003 at 19:04 UTC | |
| |
by blackadder (Hermit) on Jul 24, 2003 at 10:07 UTC | |
by blackadder (Hermit) on Jul 24, 2003 at 09:41 UTC | |
by BrowserUk (Patriarch) on Jul 24, 2003 at 17:58 UTC | |
by blackadder (Hermit) on Jul 27, 2003 at 20:43 UTC |