Lookup the BCP utility (overview) in Books Online... there you will find the correct syntax for the command. Your problem is that you are using a column name where the database name goes and that cannot be done...
Code:
The red highlighted item in you code is wrong...
EXEC master..xp_cmdshell
'bcp [DB].dbo.[table].[TXTCOL] out c:\test.txt -c -Uxxx -PXXX -Sservername'
If you don't want to export the whole table, you will need to provide a query to the BCP command. The query can be an EXEC of an existing stored procedure.
--Jeff Moden