• By default TYPE is not going to preserve Unicode data for you and I do not know of a way to setup the environment or call it where it will.

    You could try building a COPY command:

    copy File1+File2+FileN DestinationDataFile /Y /B

    Example:

    copy C:\1.txt+C:\2.txt+C:\3.txt C:\DataFile.txt /Y /B

    In your code the loop is appending to the file for each iteration using TYPE. In using COPY you'll want to change it so the loop just builds the command with all the files and pluses, and then just make one call to xp_cmdshell after the loop is done to append all the files together.

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