List files, match folders only

491 views
Skip to first unread message

Jake Opray

unread,
Nov 17, 2014, 7:50:39 AM11/17/14
to tas...@googlegroups.com
Using list files, in the match field I know you can match say, all png files (*.png), but is there something that will match just folder direcories?

I have at the moment the match field blank and so all files and folders are stored in the array. Then I test each variable in a loop for its type and find the directories with dir. But this is time consuming eapecially for directories with 100's or 1000's of files, when I may only need to find the name of the folders and that could be just 2-3 of them.

ps. Pent if you read this, I have seen in Tasker to come, listing files in date order/type order etc, please make that available soon:p

Sean Williams

unread,
Nov 17, 2014, 11:53:34 AM11/17/14
to tas...@googlegroups.com
Nice question, I've never needed to use this action but I'd suggest looking into pattern matching and try something like !*png to exclude certain files.

Adam W

unread,
Nov 18, 2014, 3:33:07 PM11/18/14
to tas...@googlegroups.com
Several ways to do it. Off the top of my head, I would...
Use List Files Action
"Pop" each file and
Use Test File action on it
Select Type in the dropdown menu inside test file.
If the return variable contains "Folder" then add it to your output
If it does not contain "Folder" then pop the next path until done.

Adam W

unread,
Nov 18, 2014, 3:35:30 PM11/18/14
to tas...@googlegroups.com
But if I get some time I will mess with it and try to do it a different way than that, as you say there should be a faster way.

Rich D

unread,
Nov 18, 2014, 7:53:09 PM11/18/14
to Tasker Google Groups Post


Using    !*.*    in the match seems to work.... 

Reply all
Reply to author
Forward
0 new messages