Script actions

Post your questions and help other users.

Moderator: Martin

User avatar
Bushmills
Posts: 286
Joined: 23 Sep 2014 21:56

Re: Script actions

Post by Bushmills » 19 Apr 2015 06:00

copying files by age is something I'd either use "rsync" for, or let "find" select them and pass their names and locations to execution of the copying or moving command. the "find" command provides a function for command execution with list of found files passed to command. At least the full versions of "find" do - the stripped down versions provided by the tool collection which comes with Android may or may not offer this particular functional aspect, I unluckily can't tell, as I don't have an unrooted, non-extended version of Android at hand. Look, again by invoking "find" with "--help", whether there's a "-exec" option available. Also look - by attempting to execute - whether there exists an "rsync" command.

bogdyro
Posts: 241
Joined: 04 Apr 2015 15:14

Re: Script actions

Post by bogdyro » 19 Apr 2015 14:09

Thanks. Ill look into that. However the script I have right now works pretty well if it weren't for this problem- can't pass a variable in the 'working dir' field of the 'execute command'

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Script actions

Post by Martin » 20 Apr 2015 18:36

It's definitely an oversight that variables are not replaced in the working directory field. Should be fixed in the next update.

For the ls-command you can workaround this issue by appending the directory to the command:
ls -l /directory
resp:
ls -l {variable}

bogdyro
Posts: 241
Joined: 04 Apr 2015 15:14

Re: Script actions

Post by bogdyro » 20 Apr 2015 23:33

Nice, thank you

Post Reply