Here is part of information:
Drive C:
Description Local Fixed Disk
Compressed No
File System NTFS
Size 465,76 GB (500 105 216 000 bytes)
Free Space 442,03 GB (474 621 784 064 bytes)
Volume Name C_Levy
Volume Serial Number B17624CD
I think, for-loop can filter this and after right for-command result look
like this:
Drive C:
Size 465,76 GB (500 105 216 000 bytes)
Free Space 442,03 GB (474 621 784 064 bytes)
There are several other disk also. How get information as above, all disks
with for-loop?
External tools like psinfo with -d parameter bring nice looking information
(with persent of free space), like this:
Volume Type Format Label Size Free
Free
C: Fixed NTFS C_Levy 465.76 GB 442.03 GB
94.9%
But there is also another information and only header and disk information
is what I want to get (like above). For-loop can also help, but what is
right syntax? Without header, I can find information with this command:
psinfo -d | find/i "ntfs". But it's look better with header.
Some utils as fsutil need admin-rights and this is not good, because I run
my system always on limited account rights. Same problem with wmic commands.
Vbs-script not need admin-rights and this might be a good method, but how to
this with vbs-script?
Does anybody knows another method to get disk usage information on the
command line? Nice little freeware programs, perhaps? I try to find
alternate programs, but many of them is only graphical.
It's very good if script or program can tell disk free persent, like psinfo.
This is usually the most significant point on the disk information.
Tapio, again :)
>Tapio wrote:
>
>> If I want to know on the command line, what is every disk status
>> (size, used and free space) there are several method to find
>> answer. Msinfo32 /report c:\temp\disk.txt /categories
>> +componentsstoragedrives put information on the file, but that is
>> create other information also.
>>
>> Here is part of information:
>>
>> Drive C:
>> Description Local Fixed Disk
>> Compressed No
>> File System NTFS
>> Size 465,76 GB (500 105 216 000 bytes)
>> Free Space 442,03 GB (474 621 784 064 bytes)
>> Volume Name C_Levy
>> Volume Serial Number B17624CD
>>
>> I think, for-loop can filter this and after right for-command
>> result look like this:
>>
>> Drive C:
>> Size 465,76 GB (500 105 216 000 bytes)
>> Free Space 442,03 GB (474 621 784 064 bytes)
>
>
>On one line:
>
>psinfo -d volume>"%tmp%\volnfo.tmp" 2>&1&&findstr ": Volume" "%tmp%\volnfo.tmp"&&del "%tmp%\volnfo.tmp"
That's good Guy but I had to reduce && to & to get any screen output.
For EG:
psinfo -d volume>"volnfo.tmp" 2>&1&findstr ": Volume" "volnfo.tmp"
Here is a method that massages the ouput from msinfo32:
1) A line starting in column one has wrapped
2) The type command is used to convert the unicode file to ansi format.
@echo off
"c:\Program Files\Common Files\Microsoft Shared\MSInfo\msinfo32.exe"
/report disk.txt /categories +componentsstoragedrives
type disk.txt > disk.tmp
findstr "Drive Description Size Free" disk.tmp
del disk.txt disk.tmp
pause
--
Regards,
Mic
Both examples work well.
Guy found another parameter "volume", what's cut most of needles
information, what psinfo -d create.
Another thing, what I'm not notice this before, that findstr can find
multiple search string in one time. That's good to know.
Thank you Guy and Mic.
Regards,
Tapio
> Does anybody knows another method to get disk usage information on the
> command line? Nice little freeware programs, perhaps? I try to find
> alternate programs, but many of them is only graphical.
>
> It's very good if script or program can tell disk free persent, like
> psinfo. This is usually the most significant point on the disk
> information.
Is there some reason you can't use PsInfo?
psinfo -d Volume
returns the disk data only, along with a bit of header information.
(psinfo -d Volume | find "%") 2> nul
displays only the actual information without the headers and splash.
--
T.E.D. (tda...@mst.edu)
Thank you, it's work great.
> Is there some reason you can't use PsInfo?
Actually no important reason. Psinfo do the job fine. I just ask on
curiosity reason, are somewhere similar programs. Sometimes I try more than
one program, what makes same thing. After I try them all, usually one of
them fascinate more than others. Reason can be fastness, look of result
etc..
Regards,
Tapio
there is one useful command line tool which i use myself for getting
disk drive summary.
thats free software by Jason Hood called jNDIR http://adoxa.110mb.com/jndir/index.html
example of usage: jndir -i -k
That's nice and very fast utility. Much faster than psinfo. Here is sample
output:
file sys total space free space [Cluster Size] UNC path
======== =============== =============== =======================
C: NTFS 500,105,216,000 474,364,047,360 [ 4096] C_Levy
===============================================================================
500,105,216,000 474,364,047,360 Total
Physical space
It's a pity, utility not calculate percent of disk free size.
Tapio