title: Moving a file to a system-dependent directory
body: <p>I'm writing a batch script to automate the movement of a .dll file into a directory.</p>
  
  <p>Unfortunately, the directory won't always be the same and is dependent on the computer being used.</p>
  
  <p>I'm able to find the directory using</p>
  
  <pre><code>dir /b /s xxx.exe
  </code></pre>
  
  <p>where xxx is an executable file guarenteed to be in the directory I'm looking for.</p>
  
  <p>Is there any way I can grab the path of that output (minus the xxx.exe) and MOVE the .dll into that directory?</p>
  
  <p>I'm new to batch files, so any tips or best practices are helpful as well.</p>