title: How to handle space of Filename in Batch For Loop
body: <pre><code>@echo off
  echo processing please wait...
  setlocal enabledelayedexpansion
  set txtfile=%~dp0mysql\my.ini.bak
  set newfile=%~dp0mysql\my.ini
  if exist "%newfile%" del /f /q "%newfile%"
  for /f "tokens=*" %%a in (%txtfile%) do (
     set newline=%%a
     echo !newline! &gt;&gt; %newfile%
  )
  </code></pre>
  
  <p>Now my.ini.bak file is in D:\Program Files\my.ini.bak<br>
  Error : The system cannot find the file Files\mysql\my.ini.bak.</p>
  
  <p>How to make this code work, so it copy each line from my.ini.bak to my.ini</p>