Hi Friends,
I have a data like below in .TXT file
id name Add
1 ; Severe weather - snow In
2 ; ;
now in my 2 id name is blank, now how to check blank field or avoid or length of the of the field in below batch script.
setlocal enabledelayedexpansion
for /F " skip=1 tokens=2 delims=;" %%b in (%file% ) do (
echo %%b
)
Batch Script : Space issue with text file to remove
Moderator: DosItHelp
-
- Posts: 21
- Joined: 16 Aug 2019 23:35
-
- Posts: 240
- Joined: 04 Mar 2014 11:14
- Location: germany
Re: Batch Script : Space issue with text file to remove
hallo,
use a real token (1st)
Phil
use a real token (1st)
Code: Select all
for /F " skip=1 tokens=1,2 delims=;" %%a in (%file% ) do if "%%b" NEQ "" (
echo %%b
) else echo EMPTY