BTW, the ~n is meant to remove the .flac extension of the filename, so that myfile.flac be converted to a myfile.mp3 file and not to a myfile.flac.mp3 file.

That works. Although not if there are any spaces in filenames. An a bit more aesthetically pleasing version (requires lame.exe and flac.exe in searchpath, e.g. System32) could be like the following. But no tags will still obviously be copied over. For that more advanced scripting will be required.