This article explains how to use the “Build Commands” feature on Windows.
To send the output of your command to a file, you have to wrap it in a shell: