Using some knowledge from this previous question , I would do the following
s = dir('c:\somefile.txt'); if s.bytes == 0 % empty file else % open the file and read it end;
I assumed empty that you meant that there really was nothing in the file, including new string characters. If by blank you mean only new string characters, then you should continue your decision.
source share