OK, i try again. Look here: https://www.simple-talk.com/sql/t-sql-programming/the-tsql-of-text-files/
--then we execute the BCP to save the file
SELECT @Command = 'bcp "select BulkCol from ['
+ @MySpecialTempTable + ']'
+ '" queryout '
+ @Filename + ' '
+ CASE WHEN @Unicode=0 THEN '-c' ELSE '-w' END
+ ' -T -S' + @@servername
EXECUTE @RESULT= MASTER..xp_cmdshell @command, NO_OUTPUT
You can call, from c# code, xp_cmdshell that execute the command (and save the file) on the server