if(-B "$filepath$filename"){...file is Binary...}