title: Retrieve Drive Letter Of File With Batch File
body: <p>So depending on the port/computer I plug my flash drive into it is recognized and a different drive letter, as you all know. I need the code to find my flashdrive name and report back to me the letter of the drive. This is what I have, so you can look at it and try to figur out what I am doing wrong.</p>
  
  <pre><code>set DriveLabel=JERRYG225
  
  for %%a in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do (
  pause
   for /f "tokens=6 delims= " %%i in ('vol %%a: ^|find "drive"') do (
    pause
    echo %%i | find /i "%DriveLabel%" &gt; nul
   )
  )
  </code></pre>