I have a text file, I was wondering anyone have a batch file to add \" to the beninning and \", at the end of each line in a text file?
For example I have
Off the top of my head, in Linux, you can...
$ for each in `cat filename` ; do echo \"$each\", ; done >> newfilename
"1",
"2",
"3",
"4",
"5",
Edited - since it's for Windows, this did the trick for me:
@echo off
setLocal EnableDelayedExpansion
for /f "tokens=* delims= " %%a in (filename.txt) do (
echo "%%a", >>newfilename.txt
)