Question
How can I pass the following cmd line command using system.callSystem() method?
If I run this following line inside windows cmd line it create a json file on Desktop.
curl https://raw.githubusercontent.com/adiraimaji/checkforupdate/master/checkforupdate.json > %USERPROFILE%\Desktop\Testfile.json
But when I try to run this line using ExtendScript with system.callSystem() method, It doesn't work well..
What should I do to get this work? I've tried escaping special characters none of them works.
var curlCmd = 'cmd.exe /c curl https://raw.githubusercontent.com/adiraimaji/checkforupdate/master/checkforupdate.json > %USERPROFILE%\Desktop\Testfile.json';
var cmdLine = system.callSystem(curlCmd);
Can anyone tell me what should I do tho make it work? And if possible please tell me how can I achieve this on MacOS too.
Thanks in advance.