I want to take the json response from a url and save it to a .json file using curl from the windows command prompt.
My goal is to add a timestamp to the file name.
The following does not work.
curl -k --ntlm -u : --write-out '%{json}' https://myurl.com -o "myfile$(date +"%H:%M").json"
It results in a file like this with no content.
The following works fine and produces the expected output, but with no timestamp.
curl -k --ntlm -u : --write-out '%{json}' https://myurl.com -o "myfile.json"
How can I get a .json
file with a timestamp?
I've tried both suggestions here and nothing seems to work. enter link description here
question from:https://stackoverflow.com/questions/66050912/curl-command-to-output-filename-with-a-timestamp