Help for this page

Select Code to Download


  1. or download this
    ($size) = ( ( qx{ dir /s $TargetPath  | find "bytes" } )[-2] =~ /([\d,
    +]+) bytes/ );
    
    print "$TargetPath : $size"
    \\HIAWATHA\C$\test : 22,578,657
    
  2. or download this
    my ($Size)=( (qx{dir /s "$TargetPath" | %SystemRoot%\\system32\\find "
    +bytes" })[-2]=~ /([\d,]+
    002 +) bytes/ );
    
  3. or download this
    use Win32::OLE;
    
    ...
    
    print $f->Size;
    22578657
    
  4. or download this
    (@dirs, @files) = ( '//HIAWATHA/c$/test' );
    
    ...
    
    print $size;
    22578657
    
  5. or download this
    perl -le " print for glob '//HIAWATHA/c$/test/*' "
    
  6. or download this
    P:\test>perl -Mstrict -wle " print for glob '\\\\HIAWATHA\\c$\\test\\*
    +' "
    
    ...
    P:\test>perl -Mstrict -wle " print for glob '\\\\HIAWATHA\\c\$\\test\\
    +*' "
    
    P:\test>perl -Mstrict -wle " print for glob qq[\\\\HIAWATHA\\c\$\\test
    +\\*] "
    
  7. or download this
    use File::Find;
    
    ...
    
    print $size;
    22578657