title: Batch file code to move and rename file at the same time
body: <p>I have written following code that move's all files from one folder to another. But when I run this I get an error. The filename, directory name, or volume label syntax is incorrect.</p>
  <pre><code>SET today=%DATE:~10,4%%DATE:~4,2%%DATE:~7,2%%TIME:~0,2%%TIME:~3,2%%TIME:~6,2%%TIME:~9,2%
  SET today=%today: =0%
  if exist D\Instrument_Files (
      Move &quot;C:\Users\Public\Documents\Logs\Test Exports\*.*&quot; &quot;D\Instrument_Files\*_%DateNtime%.csv&quot;
  ) 
  pause
  </code></pre>
  <p>Can someone please help ? Thanks</p>