Page 1 of 1

check file size

Posted: 13 Sep 2013 19:32
by ahmadmll
Hi my friends
I want a flow to check file size on this directory "/mnt/sdcard/a.txt" and when it larger than 17kb does an action.
Please help me...

Re: check file size

Posted: 13 Sep 2013 21:56
by standalonescript
It does not appear to be supported. I tried to do eval ("ls /sdcard") but it looks like only AA functions can be eval'd.

There aren't any actions for file size either.

I don't recall seeing that in the list for 1.19 either.

I didn't even find a way to do this with Tasker. I know it can be done with ruboto but that is a little more involved.

Re: check file size

Posted: 14 Sep 2013 07:12
by Martin
Hi,

You can try to execute a shell command like Execute Command: ls -l /mnt/sdcard/a.txt or Execute Command: du /mnt/sdcard/a.txt and then use variable stdout.
The variable will most likely not just contain the size but also the file name so you have to use a script to extract the substring containing the size.

Regards,
Martin