• It saddens me a bit that the code is accessing the command prompt and the file system from within T-SQL, especially as part of an applicaiton design, but from your other thread I know the situation and know you are locked into this design. That said, if you ever have the chance to rewrite things SSIS would be my preference to accomplish what is being done.

    That aside, if you swap out the -c switch for a -w switch in your bcp command I think you will get where you want to go.

    bcp Utility - SQL Server 2005

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato