null string
Posted: 24 Aug 2011 01:51
@echo off
setlocal enabledelayedexpansion
Set sz=
for /f "tokens=5 delims= " %%a in
('type mytext.txt') Do (Set sz=!sz!+%%a)
echo !sz!
if mytext.txt is empty , do statement does not get executed and the statement
,echo !sz!, results in ,!sz! itself. How can i check the sz to see if mytext.txt is empty or not?.
setlocal enabledelayedexpansion
Set sz=
for /f "tokens=5 delims= " %%a in
('type mytext.txt') Do (Set sz=!sz!+%%a)
echo !sz!
if mytext.txt is empty , do statement does not get executed and the statement
,echo !sz!, results in ,!sz! itself. How can i check the sz to see if mytext.txt is empty or not?.