common/tools/findPhysicalDrive.pl
changeset 924 a5ed0e6ca679
parent 891 6c56420d1006
child 955 28714977dccb
equal deleted inserted replaced
923:5ccf9d5ab663 924:a5ed0e6ca679
    72 
    72 
    73 		# Ignore the system drive
    73 		# Ignore the system drive
    74 		next if ($driveLine =~ m{System\s*$});
    74 		next if ($driveLine =~ m{System\s*$});
    75 
    75 
    76 		# Use dir to get the freespace (bytes)
    76 		# Use dir to get the freespace (bytes)
    77 		my @bytesFree = grep { s{^.*?(\d+) bytes free\s*$}{$1} } map {chomp;$_} `cmd /c dir /-C $letter:\\`;
    77 		my @bytesFree = grep { s{^.*?(\d+) bytes free\s*$}{$1} } map {chomp;$_} `cmd /c dir /-C /A $letter:\\`;
    78 		# Take the value from the bottom of the report
    78 		# Take the value from the bottom of the report
    79 		my $bytesFree = $bytesFree[-1];
    79 		my $bytesFree = $bytesFree[-1];
    80 
    80 
    81 		# Record info for this volume
    81 		# Record info for this volume
    82 		push @drives, $letter;
    82 		push @drives, $letter;