// extract filesize with command dir windows 10
// is ok for all system 32/64 and the best compatibility for Dummy file
// but cant return value in (int) for best return use Float
<?php
filesize_dir("d:\\test.mkv"); //11.5GB => return (float) 12401880207
function filesize_dir($file) {
exec('dir ' . $file, $inf);
$size_raw = $inf[6];
$size_exp = explode(" ",$size_raw);
$size_ext = $size_exp[19];
$size_int = (float) str_replace(chr(255), '', $size_ext);
return $size_int;
}
?>