Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 xp_cmdshell

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-04-22 : 12:39:58
spins writes "Do you know how to add a datestamp to a filename which is part of a bcp statement xp_cmdshell.

eg. master..xp_cmdshell 'bcp IOD_POD..Converted_Data out c:\data.txt -c -t -FTPSERVER -Usa -P'

Therefore a new text file will be created everytime this bcp is run, which could be used for logging information."
   

- Advertisement -