"andespoint" wrote
The Mount/\Commands "GetFree" and "GetFreeM" provide this information using
only shell scripting commands. They work CONSISTENTLY on all NT-based
systems from NT4 SP6a+ through Server 2003. See
(http://TheSystemGuard.com/MtCmds/GetValue/GetFree.htm)
(http://TheSystemGuard.com/MtCmds/GetValue/GetFreeM.htm)
for color-keyed examples.
The syntax for a remote server would be
PUSHD \\Server\c$
%.GetFree%
POPD
The free space value is now stored in the environment variable %#Free%.
*******
Notes:
1. .Mount/\Commands are constructed using ONLY builtin
commands common to all four platforms (NT/2K/XP/K3).
2. .M/\C's are NOT case sensitive. Mixed case is used
for Visual Clarity only.
3. The (FREE) Advanced NT/2K/XP Command Library (ntlib.cmd)
provides over 50 sample Mount/\Commands to assist with
writing and documenting cross-platform shell scripts.
You can obtain it at (http://ntlib.com).
*******
-tsg
__________________________________________________ __________
TheSystemGuard.com | BoomingOrFuming.com | MountCommands.com
Free and "Almost Free" Knowledge for Windows System Admins!