TYPE

Display the contents of a text file or files.

Syntax
TYPE [drive:]pathname(s)If more than one file is specified the filenames are included in the output.
If a wildcard is used the filenames are not displayed.

Output can be redirected into a new file:

TYPE file.txt > Newfile.txt

Output can be appended to an existing file:

TYPE file.txt >> ExistingFile.txt

To do the same with user console input :

TYPE CON > Newfile.txt

This will require a CTRL – Z to indicate end of file.

When using redirection to SORT a file the TYPE command is used implicitly
For example:

SORT < MyFile.txt

If you TYPE a Unicode text file, the output will be ANSI.
eg:
TYPE UnicodeFile.txt > ANSIFile.txt

To convert multiple Unicode files to ASCII try this script

@echo off
ren *.txt *.txx
for &qt;&qt;G in (*.txx) do (TYPE &qt;&qt;G >&qt;&qt;~nG.txt)
echo del *.txx

Tags: