How do I save curl output to a file in Windows? or What's the best way to redirect curl output to a f

12 Replies, 739 Views

Ugh, Windows and curl can be a pain. The encoding issue might be because CMD defaults to weird stuff. Try adding `--output - | Out-File -Encoding UTF8 output.txt` in PowerShell.

For appending, `>>` works in CMD, but sometimes it’s finicky. If you’re stuck, maybe try using WSL (Windows Subsystem for Linux)? Curl behaves better there.

Also, check out curl’s docs (https://curl.se/docs/manpage.html)—they’ve got all the flags for saving files.

Messages In This Thread



Users browsing this thread: 1 Guest(s)