title: Removing double quotes from passed parameters in batch script
body: <p>I'm trying to copy specific files from a directory with sub directories. I have listed the file names in a text file. And because of spaces in the file names I used a quote to enclose the for loop variable %%a below.</p>
  
  <pre><code>setlocal EnableDelayedExpansion
  
  for /f "tokens=1 delims=" %%a in (G:\TestRename\List.txt) do (
  
  for /r "G:\TestRename\" %%I in ("%%a") do copy /y %%I "G:\TestRename\ListDocs\" 
  )
  pause
  </code></pre>
  
  <p>However when the %%a parameter is passed to %%I the quotes remain despite trying / to escape. Not sure of how to properly pass file names into %%I without double quotes. Can anyone kindly assist?</p>
  
  <p>My text files contains filenames like</p>
  
  <pre><code>1_test of Out_2feb24_1.pdf
  
  2_test of in_2feb24_2.pdf
  
  3_test_2feb24_1.pdf
  </code></pre>