DroidDB Tip of the Month
DroidDB® Tip for April 2017
Executing a Shell Command
It is possible to execute a shell command from your form. You may want to do this to create a folder (mkdir) or move a file (mv).
To do this, on your form, create a button (or add a step to a macro) whose "action" is RUN EXTERNAL. Set "command" to "shell" (without the quotes). Set "arg" to a variable that contains the shell command you want.
For example, if you want to rename a file from
\sdcard\MyApplication\MyFile.txt to \sdcard\MyApplication\MyOldFile.txt,
the "arg" will be set to a variable that contains:
mv \sdcard\MyApplication\MyFile.txt \sdcard\MyApplication\MyOldFile.txt