ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > Living Room

How to concatenate a number of text files which may have different encoding?

<< < (2/2)

IainB:
Ah, thanks for that. I had forgotten the TYPE command.
I knew there was some way to normalise all the encoding to the output file, but could not recall what it was.

Unfortunately, the COPY command seems to be no good in any shape or form, as there is apparently no way to force it to normalise the encoding to the output file.

What worked: for %i in (x*.txt) do type %i >> combined.txt
I have assumed it took the input files in alphabetic order - the out put looks as though it did, anyway.

Navigation

[0] Message Index

[*] Previous page

Go to full version