Discussion forum for all Windows batch related topics.
- Posts: 1
- Joined: 08 Apr 2019 09:37
I have file like below
and I need output like below
I need windows script to do this. Here the should be deleted based on 2nd comma
- Posts: 1615
- Joined: 06 Dec 2011 22:15
- Location: México City, México
Another way to say the same thing is that you want the first and second tokens delimited by comma
, isn't it?
Code: Select all
for /F "tokens=1,2 delims=," %%a in ("theFile.txt") do echo %%a,%%b