Copy link to clipboard
Copied
I know you can use app.system() in PS to execute a shell script. Is there a way to capture the information it's outputting?
For example:
var info = app.system('find /Users/ypml/Desktop -name \"*.jpg\"');
alert(info);
just returns '0', instead of the list of files that were found. Any ideas how to get that information?
thanks!
Use a redirect to save the output to a file. Then read the info from the file.
Copy link to clipboard
Copied
Use a redirect to save the output to a file. Then read the info from the file.
Copy link to clipboard
Copied
thank you! you're a genius!