If all that's too complex, how about just using the output of 'chkdsk'?
my $dskinfo = `chkdsk`;
You can figure out how to parse that... pretty easy.
If you're on a unix system, you can use the df shell command.
Dave
This isn't 20 questions. I'm not going to be able to guess what you want if you don't tell me.
After searching CPAN for a proper solution and reading the POD for Filesys::DiskFree, you can set out to install that module, work on your own solution and possibly learn something along the way. If you get stuck, feel free to post a followup to this thread with a question detailing a specific issue that you are having trouble getting past.
Dave
Point your web browser to http://search.cpan.org and start searching. None of the solutions you've been provided over the course of the last two threads you've started on the same subject have met with your liking. Maybe you'll have better luck searching for yourself.
Dave, OUT---
For more information on this node visit: this
You should really learn how to search... searching df on CPAN gives some interesting results. There is also Super Search, search "disk size": node 340945, node 340212 and Determine volume size on Windows, a thread started by you today... You should also specify what OS you are using to get a useful answer.
Ciao, Valerio
CDROMINF - Version 1.2 (11/29/96)CDROMINF is a DOS command line program to display information about the installed CDROM drives, the MSCDEX driver, and any CD or CDROM discs loaded in the drive. It supports both IDE (ATAPI) and SCSI CDROM drives. It now also detects ATASPI drivers under DOS.
When I run this on my windows 98 / vmware instance I get the following output
CDROMINF Version 1.2 - MSCDEX, ASPI, ATASPI and DPMI exerciser (C) 1993-96 - Computall Services DPMI is installed, version: 0.90 ASPI is installed. ATASPI is not installed. MSCDEX is installed. Number of MSCDEX drives: 1 First MSCDEX drive: D Using MSCDEX drive: D MSCDEX version: 2.95 Disc File System: CD-ROM with iso9660 fs Device status: Door is closed. Door is locked. Supports only cooked reading. Read only. Data read and plays audio/video tracks. No interleaving. Supports prefetching requests. Supports audio channel manipulation. Suppports HSG and Red Book addressing modes. Unknown bit is not set. Audio Channel Information: Input channel 0 for output channel 0 Input channel 1 for output channel 1 Input channel 3 for output channel 2 Input channel 7 for output channel 3 Volume is 0xff for output channel 0 Volume is 0xff for output channel 1 Volume is 0x00 for output channel 2 Volume is 0x00 for output channel 3 Sector size for raw mode is:2340 Volume size is:0004e8c8 MSCDEX UPC: Control/ADR:c8, UPC info:e8040003000700 Track listing: Lowest track: 1, Highest track: 1, Start of Lead Out Track: 71:29.61 Track:01, Start: 00:02.00, data track, digital copy prohibited Track Length Start End ---------------------------------------- 01 71:27.61 00:02.00 71:29.61Note the field "Volume size", which should not be that difficult to parse.
As you can see there are command line tools for windows to get this kind of information (I found quite a lot of them, including the cdrecord collection of tools). I suggest you give this one a try.
Next time, do your own homework, and don't complain about the lack of command line tools on windows - Perl itself is not installed on a fresh windows machine either, yet somehow it's on your yours.
Joost
perlmonks.org content © perlmonks.org and Anonymous Monk, chiburashka, davido, Joost, NodeReaper, valdez
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03