You cold try something like this.
@echo off
set "opts=usebackq tokens=* delims="
set "file=path_to_yourfile.txt"
for /f "%opts%" %%i in ("%file%") do (
for /f "tokens=* delims=" %%a in ('echo %%i^| findstr /b ")"') do (
echo(%%i,
goto:skip
)
echo(%%i)
):skip
Still not clear enough what you would like to do with that (ENTER). Try it and see if it is what you're looking for.
If this is not the case, what you can try after is to add echo.
after echo(%%i,
, i.e.
echo(%%i,
echo.
EDIT:
OK, so you can add the comma at the same time as you append the single file to the Merged one:
@echo off
if exist "pathDATAMERGED.txt" del "pathDATAMERGED.txt"
pushd "C:folderwhereyouhaveallxtfiles"
for /f "tokens=1,2,* delims=" %%a in ('dir /b^| findstr /e ".txt"') do (
>>"pathDATAMERGED.txt" (type %%a &&echo ,)
)
popd
This adds a comma after you typed each file.
BTW, you should absolutely try to be more clear and precise when you explain what you would like to do.
In fact, you say you want to move by 4 spaces something (either { or }, IT IS NOT CLEAR to me..). I guess than that this comes from the formatting of your single text files, so why didn't you format the the right way if this is the case?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…