Remove carriage return on last line in BCP SQL Server or Windows -


i have file

    1,abc     2,def     3,xyz *+<cr>*   

which bcp'd out sql server.

i need file

    1,abc     2,def     3,xyz *-<no -----cr>*  

dont want carriage return last line. there way can in sql server bcp or in dos batch or vb script

you can .readall source file, remove trailing vbcrlf (trim won't work because it's restricted spaces, left( sall, len( sall ) - 1 ) may enough, else use regexp.pattern "\s*$"), , .write (not! .writeline) back.


Comments