title: Set file names as variables in batch file
body: <p>I have a question how to set multiple files as variables in batch file? I trying to do something with below script:</p>
  <pre class="lang-bat prettyprint-override"><code>move c:\*.gpg q:\
  for %%F in (&quot;q:\*.gpg&quot;) do (set file=%%~nxF)
  if exist q:\*.gpg echo done copying files: %file%
  </code></pre>
  <p>Above works fine only with one file. If there are more than two it only echos one of them. How can I echo in one line all the files that where copied?</p>