title: Removing "enter" character with batch?
body: <p>I use a tool called "exiftool" for reading metadata information from video file for Listing/Categorization. Exiftool output is something like this.</p>
  
  <pre><code>1920x1080
  2:58:09
  12421 MB
  </code></pre>
  
  <p>What I want is;</p>
  
  <pre><code>[1920x1080][2:58:09][12421 MB]
  </code></pre>
  
  <p>This is what I am trying to do for removing "enter" character;</p>
  
  <pre><code>:_Dongu2
  set GELEN=%~1
  set /a SAYAC2+=1
  if %SAYAC2% LEQ 99 (
    if %SAYAC2% LEQ 9 (
      title Ilerleme Durumu: 00%SAYAC2% / %FSAY%
    ) else (
      title Ilerleme Durumu: 0%SAYAC2% / %FSAY%
    )
  ) else (
    title Ilerleme Durumu: %SAYAC2% / %FSAY%
  )
  
  setlocal DisableDelayedExpansion
  set "firstLineReady="
  (
      for /F "eol=$ delims=" %%a in ('exiftool -s3 -ImageSize -Duration -FileSize "%~1\%GELEN:~20,-23%.mp4"') DO (
          if defined firstLineReady (echo()
          set "firstLineReady=1"
          &lt;nul set /p "=%%a"
      )
  )&gt;&gt; out.txt
  goto :EOF
  </code></pre>
  
  <p>So far I didn't work it out. I found this function from <a href="https://stackoverflow.com/questions/6254067/batch-delete-line-feed-from-end-of-text-file/6262823#6262823">Jeb's answer</a> on another question. This is the way I call this function</p>
  
  <pre><code>(for /f "tokens=*" %%x in (%MTEMP%) do call :_Dongu2 "%%x") &amp;&amp; title %NAME%
  </code></pre>
  
  <p>and <code>%MTEMP%</code> file is like</p>
  
  <pre><code>Z:\Movies\000y.001y\The.Lord.of.the.Rings.The.Fellowship.of.the.Ring.(2001){0120737}[00085]
  Z:\Movies\000y.001y\The.Lord.of.the.Rings.The.Return.of.the.King.(2003){0167260}[00087]
  Z:\Movies\000y.001y\The.Lord.of.the.Rings.The.Two.Towers.(2002){0167261}[00086]
  </code></pre>
  
  <p>each movies attitude had to be on another line. out.txt had to be like;</p>
  
  <pre><code>[1920x1080][2:58:09][12421 MB][The.Lord.of.the.Rings.The.Fellowship.of.the.Ring]
  [1920x1080][3:02:31][14660 MB][The.Lord.of.the.Rings.The.Return.of.the.King]
  .
  .
  .
  </code></pre>