More precisely, it would look this way :
Code:
list dirs lformat "script2 *"%s*"" >script1
execute script1
With "script2" having the "s" bit set and looking like this :
Code:
.key dir/a
.bra {
.ket }
if exists "{dir}.info"
echo {dir}
endif
(where you replace "echo" i used to list them, with any command you wish)
There is perhaps a simpler way, but it works at least for listing them