Total size of a drive
chiburashka
created: 2004-06-16 05:18:28
I'f like to know how to get the total size of the (local) drive - on which this file (script e.g. test.pl) is located ?
Re: Total size of a drive
created: 2004-06-16 05:26:10
What was wrong with the answers you got in [id://367078]?

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

Re^2: Total size of a drive
created: 2004-06-16 05:31:00
The answers there didn't work. and how can i do it on a CD ? CHKDSK doesn't work for CDs (It doesn't work with RAW files).
Re^3: Total size of a drive
created: 2004-06-16 05:38:20
Aaaarrrrggghhh!!! Why don't you try to give those sorts of details when you compose your questions in the first place?

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

Re^4: Total size of a drive
created: 2004-06-16 06:17:39
Is there something that can check the total size of a CD drive (RAW), and works on Windows ?
Re^5: Total size of a drive
created: 2004-06-16 06:25:18
Win32::DriveInfo maybe?

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---


Re^5: Total size of a drive
created: 2004-07-07 18:16:30
you already ask this
Re^3: Total size of a drive
created: 2004-07-07 18:17:58
This node was taken out by the NodeReaper on Wed Jul 7 19:03:21 2004 (EST)
Reason: Elian anonymonk's getting abusive (one of many)

For more information on this node visit: this

Re: Total size of a drive
created: 2004-06-16 05:29:03

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

CD ROM disk size information on Win32
created: 2004-06-16 12:22:32
Ok, so to end these threads once and for all I searched around a bit on google and hit # 2 gives me this page which contains a command line tool called "CDROMINF".

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.61
Note 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

Re: Total size of a drive
created: 2004-07-07 18:18:29
This node was taken out by the NodeReaper on Wed Jul 7 18:47:16 2004 (EST)
Reason: Elian Empty

For more information on this node visit: this

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