title: Check if directory exists using ADB and push a file if it does
body: <p>I need to be able to test and see if a directory exists on the SD card of an Android device and then push a few files to that directory if it does exist.</p>
  
  <p>So far, I have this:</p>
  
  <pre><code>adb %argument% shell if [ -e /sdcard/ ]; then echo "it does exist"; else echo "it does not exist"; fi;
  </code></pre>
  
  <p>But how can I let my batch script know that the directory exists so that it can continue to push the file to that directory?</p>