I want to create new file and to add info in it. But at the beginning I want to clear all its information. So I wrote:
@if "%DEBUG%" == "" @echo off
@rem ############################################
@rem # Create new empty file #
@rem ############################################
:setup
if "%OS%"=="Windows_NT" setlocal
SetLocal EnableDelayedExpansion
goto create
:create
@cmd /c echo( >%temp%\hosts
goto end
:end
if "%OS%"=="Windows_NT" endlocal
PAUSE
But when I open the file there is leading empty line
<empty line>
SomeInfo
Where is just empty line. How to create new file with no leading empty line?