Output from running an external application to an external text file - Forum

Forum Navigation
You need to log in to create posts and topics.

Output from running an external application to an external text file

How do I output the output of an external application to an external text file?
Say, run curl.exe and get the output to the file myip.txt

This one doesn't work. What's wrong with it?

 

@leopold

This one doesn't work. What's wrong with it?

I do not have experience using curl, so I am not sure of the significance of ifconfig.me, but according to this page ... https://catonmat.net/cookbooks/curl/save-response-to-file ... you can make curl output its content directly to a file of your choice ...

curl -o response.txt https://google.com?q=kitties

In this recipe, curl uses the -o response.txt command line option to save the response from a GET request that it makes to https://google.com?q=kitties to a file with filename response.txt.

I would try this outside of your Run command first to make sure that curl does place the output in the requested file.

 

luishp, Vadim and Darbdenral have reacted to this post.
luishpVadimDarbdenral

@leopold

@gaev had a great answer, this command will work on even more applications..

As long as curl is in your path on your computer the example below should work fine, otherwise use the full path to curl n the command

Add this action to a button in your app, after test you should find the help.txt file in your application folder.

Run "CMD.exe" "/c [#34]curl -help > help.txt[#34]" "LoadComplete" "" ""

You can use a batch file for extended commands and just call the batch file too

curl -help > help.txt

 

 

luishp and CN_Iceman have reacted to this post.
luishpCN_Iceman