Very good summary of methods, but you forgot the oldest one in the book. We routinely use CMD calls to write files, but surprisingly it's just as fast to write using the ECHO command to write any amount of data necessary. Something like:
Declare @cmd varchar(255), Declare @data varchar(1000), Declare @append varchar(2), Declare @path varchar(255), Declare @filename varchar(255), Declare @output varchar(2000)
Set @cmd = 'echo'
Set @data = 'some sort of data'
Set @append = '>>' -- to create a file
Set @append = '>' -- to append a file
Set @path = '\\someservershare\share' or 'c:\localpath\localdir'
Set @filename = 'somefilename'
Set @output = @cmd + ' ' + @data + ' ' + @append + ' ' + @path + @filename
EXEC master..xp_cmdshell @output
There are other techniques to just create an empty file by using the @echo command, and dozens of other things you can do with echo. Plus, if you place the whole thing in params in a Store Procedure you can pass in other commands and do most any DOS command you want. Of course be sure the security is set correctly so it can't be abused. This method outputs about a 1.5MB text file in about 30 seconds.