title: Batch file: If I know what folder name starts with, but not the whole name, how to get into the folder
body: <p>I was trying to make a batch file to do xcopy from one location to the other, for around 50 folders.</p>
  
  <p>lets say the folders are named like:
  Folder1: 1abc
  Folder2: 2qer
  Folder3: 3asd
  Folder4: 4jfd
  ... and so on. I know the the folder name starts with a number, so I would do something like </p>
  
  <pre><code>:COPYDIAG
  //The counter part in the XCOPY is what I don't get
  XCOPY %counter%"\Documents\*.* OtherLocation\
  SET /A countDiag1 += 1
  IF %countDiag1%==%endDiag1% (GOTO :EOF) ELSE (GOTO :COPYDIAG)
  </code></pre>
  
  <p>So, how would I get the string for the whole folder name if I know that the folder name starts with a incremental number?</p>