osql isn't great for outputing - if you use bcp, you'll find the format much easier to deal with. With the -T flag, you can use windows credentials (assuming you've set the correct permissions in SQL Manager).
Here's one I use to capture out of network BBs (I created a view in SQL Manager):
Code:
bcp "BESMgmt.dbo.OutOfNetworkBBsWithNulls" out "%~dp0BBOutput.txt" -c -t, -S "ServerName\BESMgmt" -T