I have a text file with id's separated by new line
I want this text file to be comma separated using Batch script
Refer my code below, this code generates Comma seperated string but still with new line. I want the comma seperated string in single line
@echo on & setlocal ENABLEDELAYEDEXPANSION
for /f "tokens=* delims=" %%a in (input.txt) do (
set /a N+=1
echo ^%%a^,>>output.txt
)
input.txt is
1
2
3
4
5
Output.txt should be 1,2,3,4,5