Forum Discussion

lemo's avatar
lemo
New Contributor II
8 years ago

How to list all assets of non-directory type?

Is there a way to get a list of all assets that are not directories? i.e. not type ‘Dir’?

I tried to do this by looping over a ‘SnapLogic List’ snap to recursively navigate down through the directory paths (refer below) but it results in a stack overflow.

I know I can’t use ‘Pipeline Execute’ for the pipeline to call itself since recursion is not supported.

I suppose I could just use assume the path depth will always be at most three and use three separate ‘SnapLogic List’ snaps, but this seems quite hacky.

Any other ideas?

2 Replies

  • aleung's avatar
    aleung
    Contributor III

    Just created this pipeline to show all non-Dir assets. Does this work for you?

    • lemo's avatar
      lemo
      New Contributor II

      Thanks Alan, I appreciate your response and for putting that together for me. That’s the three separate ‘SnapLogic List’ snaps approach I was trying to avoid, but I suppose it’s as good as we can get for now.

      Cheers