Havent tried it but would assume that you would pipe to an output file. something like:
sqlcmd -S . -d master -Q "select name from sys.databases" -o "c:\output.csv"
But obviously inside a XP_cmd... statement.
Hope this helps. 🙂
Adam Zacks-------------------------------------------Be Nice, Or Leave