title: How to use wildcards in Batch programming?
body: <p>I am trying to move certain groups of files using wildcards to a folder that is created by the group's filename. The names of the files are stored in "events.txt".My batch file is running uptil the last line. It is displayed that my syntax is not correct. </p>
  
  <pre><code>echo off
  for /F "tokens=*" %%A in (events.txt) do call :makemove %%A
  pause 
  exit
  
  :makemove
  set f=%1
  set file=%f:~0,-4%  
  md X%file%
  set dest=C:\Users\sony\Desktop\X%file%
  move /y "C:\Users\sony\Desktop\*%file%*.*" "%dest%"  
  </code></pre>