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.
So far, I have this:
adb %argument% shell if [ -e /sdcard/ ]; then echo "it does exist"; else echo "it does not exist"; fi;
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?
Here is what I have done in batch script:
There could be multiple files that fit the fileName, so I chose to have it test greater than 0.
To test for exact match and using bash in Linux (reference):