- or download this
my ($Size)=( (qx{dir /s "$TargetPath"})[-2]=~ /([\d,]+) bytes/ );
- or download this
my ($Size)=( (qx{dir /s "$TargetPath" | find "bytes" })[-2]=~ /([\d,]+
+) bytes/ );
- or download this
use Win32::OLE;
my $size = Win32::OLE->CreateObject('Scripting.FileSystemObject')
->GetFolder( $TargetPath )
->size();
- or download this
my (@dirs, @files) = ($TargetPath);
scalar map{
push @{ (-d) ? \@dirs : \@files }, $_
} glob pop(@dirs) . '/*' while @dirs;
my $size += -s for @files;