Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

ExecuteStreamCommand only when all info are collected

avatar
Contributor

Hi to everybody,

hope someone can help me on this.

 

I have a script that outputs(in json format) a list of files present in a given directory, for example it returns something like this:

{
  "name" : "2016026856",
  "type" : "directory",
  "children" : [ {
    "name" : "example.pdf",
    "type" : "file"
  }, {
    "name" : "2016026856.pdf",
    "type" : "file"
  } ]
}

After that i need to call a script that merge all files into a single PDF(of course if the file count is more than 1), the command could be simple just for example "pdfunite example.pdf 2016026856.pdf merged.pdf", however.... how can i pass to the command above all filenames found in json?

 

Tried splitting json, then working on fragment.count but really hard to collect all filenames...probably i'm thinking in a too complicated anner and there's a simple way to do it..

 

Many thanks for pointing me in the right direction.

Appreciate!

0 REPLIES 0