Code: Select all
@echo off
set str=some text
echo %str%>tmp.tmp &REM space before the & sign!!!
After the 'text' there is a space.
Code: Select all
some text
Saso
Moderator: DosItHelp
Code: Select all
@echo off
set str=some text
echo %str%>tmp.tmp &REM space before the & sign!!!
Code: Select all
some text
Code: Select all
@echo off
del /s test.txt 2> NUL > NUL
@echo on
echo Test1>>test.txt&REM
echo Test2>>test.txt &REM
echo Test3>> test.txt&REM
echo>>test.txt Test4&REM
echo Test5>>void.txt>>test.txt&REM
>* > ::$ 2>errorX.txt echo Test6>>void.txt>>NUL>>test.txt=2>Error.txt&REM
@echo off
for /F "delims=" %%a in ('findstr /N "^" test.txt') do (
echo %%a'
)
output wrote:C:\Users\jeb\x>..\redir.bat
C:\Users\jeb\x>echo Test1 1>>test.txt & REM
C:\Users\jeb\x>echo Test2 1>>test.txt & REM
C:\Users\jeb\x>echo Test3 1>>test.txt & REM
C:\Users\jeb\x>echo=Test4 1>>test.txt & REM
C:\Users\jeb\x>echo Test5 1>>test.txt & REM
C:\Users\jeb\x>echo Test6 1>>test.txt 2>Error.txt & REM
C:\Users\jeb\x>echo Test7 1>>test.txt 2>Error.txt & REM
1:Test1'
2:Test2 '
3:Test3'
4:Test4'
5:Test5'
6:Test6'
7:Test7'