title: Unable to adb pull in a batch file "for /f"
body: <p>I am trying to set a batch file to search for logfiles in multiple users profiles. it seems to find the files without issue however, adb pull fails with a error.</p>
  
  <p>:Batch</p>
  
  <pre><code>@echo off
  
  echo.
  echo checking files
  adb shell ls -d $PWD /data/user/*/com.myap/app_log/*.log
  echo.
  
  echo copying files
  for /f "skip=1" %%a in ('adb shell ls -d $PWD/data/user/*/com.myapp/app_log/*.log') do (
  echo values are %%a 
  adb pull %%a
  )
  </code></pre>
  
  <p>Results:</p>
  
  <pre><code>checking files
  //data/user/0/com.myapp/app_log/2016-08-09.log
  //data/user/10/com.myapp/app_log/2016-08-09.log
  
  copying files
   Values are //data/user/10/com.myapp/app_log/2016-08-09.log
  ' does not exist/data/user/10/com.myapp/app_log/2016-08-09.log
  Press any key to continue . . .
  </code></pre>
  
  <p>If i run the following without a variable, it works fine</p>
  
  <pre><code>adb pull //data/user/10/com.myapp/app_log/2016-08-09.log
  1738 KB/s (81920 bytes in 0.046s)
  </code></pre>
  
  <p>This works but wont work when ls returns multiple files</p>
  
  <pre><code>echo copying files
  for /f "skip=1" %%a in ('adb shell ls -d $PWD /data/user/*/com.blackberry.enterprise.bscp/app_log/*.log') do set path=%%a
  echo %path%
  adb pull %path%
  </code></pre>