List Files not working

608 views
Skip to first unread message

Heather

unread,
Aug 8, 2014, 2:14:51 PM8/8/14
to tas...@googlegroups.com
I have the List Files action set to list the files of the internal storage Pictures/Screenshots directory which currently has 1 png file, but when I run it, the variable doesn't get any results. I know it should store in an array so I checked for %Screenshot1 and I even scrolled through all the variables, but there is only an empty %Screenshot variable listed. What am I missing?

Pent

unread,
Aug 8, 2014, 2:58:46 PM8/8/14
to tas...@googlegroups.com


I have the List Files action set to list the files of the internal storage Pictures/Screenshots directory which currently has 1 png file, but when I run it, the variable doesn't get any results. I know it should store in an array so I checked for %Screenshot1 and I even scrolled through all the variables, but there is only an empty %Screenshot variable listed. What am I missing?

You selected the dir with the magnifying glass in the action edit screen ? What's the name of the file ? Could you please post the action description (not XML), long-click the task to export it.

Pent

Heather

unread,
Aug 8, 2014, 3:17:49 PM8/8/14
to tas...@googlegroups.com
Here's the description:

Move Screenshots (111)
A1: List Files [ Dir:Pictures/Screenshots Match: Include Hidden Files:On Use Root:On Variable:%Screenshot Continue Task After Error:On ]

The file name in the directory is Screenshot_2014-08-08-14-07-22.png

And I did use the magnifying glass to get the directory.

Jeremy Harris

unread,
Aug 8, 2014, 3:53:08 PM8/8/14
to tas...@googlegroups.com
A1: List Files [ Dir:Pictures/Screenshots Match: Include Hidden Files:On Use Root:On

Just a shot in the dark but maybe try "/Pictures/Screenshots"??

Heather

unread,
Aug 8, 2014, 4:09:55 PM8/8/14
to tas...@googlegroups.com
When I did that it came up saying file not found. :-/

Jeremy Harris

unread,
Aug 8, 2014, 4:22:20 PM8/8/14
to tas...@googlegroups.com
In the Variables tab, when you check %Screenshots (not %Screenshots1) ... is there any value in it?

Heather

unread,
Aug 8, 2014, 4:42:48 PM8/8/14
to tas...@googlegroups.com
Nope I just have an empty %Screenshot variable

nanobrain

unread,
Aug 8, 2014, 4:43:52 PM8/8/14
to tas...@googlegroups.com
I tried this out (except I used my DCIM/Camera folder). %Screenshots in the variables tab had no value, %Screenshots1, etc had /storage/emulated/0/DCIM/Camera/filename1 etc in the variables tab.

Whatever is coming from the magnifying glass is relative to /sdcard0 (aka /storage/emulated/0, that's also where my Tasker directory resides) on my phone (Nexus 5)

OP : So it should work, but maybe you have a wonky filesystem? What if you put in the absolute path into the Dir field of the list file action. You should be able to get that from a file manager like Astro or Root Explorer.

Heather

unread,
Aug 8, 2014, 4:49:59 PM8/8/14
to tas...@googlegroups.com
Brilliant! /sdcard/Pictures/Screenshots/ worked

Pent

unread,
Aug 9, 2014, 2:33:18 AM8/9/14
to tas...@googlegroups.com


On Friday, 8 August 2014 22:49:59 UTC+2, Heather wrote:
Brilliant! /sdcard/Pictures/Screenshots/ worked

Could you try it with Pictures/Screenshot and uncheck Use Root please ? That could be the cause of the problem and
I presume that root isn't needed for that dir.

Thanks,

Pent

Heather

unread,
Aug 9, 2014, 2:40:07 AM8/9/14
to tas...@googlegroups.com

You're right, it worked with Use Root unchecked under Pictures/Screenshots

Pent

unread,
Aug 9, 2014, 3:01:36 AM8/9/14
to tas...@googlegroups.com


You're right, it worked with Use Root unchecked under Pictures/Screenshots


Tasker uses whatever Android reports as the external storage root when you put a relative path in like
that. That works for Android APIs, but when Use Root is checked, the list is done via a shell, under
which the paths are different. Will have to think about that...

Pent

Lucas Bibby

unread,
Apr 21, 2017, 12:27:59 PM4/21/17
to Tasker
Same problem. I'm stymied.

Startinventory (23)
A1: Scan Card [ File:Pictures/Inventory/ ]
A2: List Files [ Dir:Pictures/Inventory Match: Include Hidden Files:On Use Root:Off Sort Select:Modification Date Variable:%filelist ]
A3: Flash [ Text:%filelist Long:On ]
A4: Popup [ Title: Text:%filelist Background Image: Layout:Popup Timeout (Seconds):5 Show Over Keyguard:On ]
A5: Say [ Text:The variable is %filelist As you can see there is no data in the variable. Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
A6: Variable Set [ Name:%filelist To:fucking test Recurse Variables:Off Do Maths:Off Append:Off ]
A7: Flash [ Text:%filelist Long:On ]
A8: Popup [ Title: Text:%filelist Background Image: Layout:Popup Timeout (Seconds):5 Show Over Keyguard:On ]
A9: Say [ Text:The variable is %filelist As you can see this one worked. Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus:On Network:Off Continue Task Immediately:Off ]
A10: Stop [ With Error:Off Task: ]


Used the magnifying glass.
Tried other stuff. See https://drive.google.com/folderview?id=0Bx-Pb5i0zlcbMFc5VzdIUWZRUkU

Lgg3 d852 android 6.0 MM noroot tasker 4.9u4m


Any other thoughts, ideas, stuff to try?

Pent

unread,
Apr 21, 2017, 12:57:34 PM4/21/17
to Tasker


Same problem.

Could you please describe the problem. People often post on the end of an old thread with 'same problem' but
it turns out to be only a vaguely similar problem.

The Flash in your task will show nothing, because the results are in an array %filelist1, %filelist2 etcr

That looks like your problem here, but that's not the problem of the original poster.

Pent
Reply all
Reply to author
Forward
0 new messages