Hopefully "ScriptingTipsAndTricks" helps you with your batch file or vbscript scripting :-)
[Bottom][Contents][Prev]: TASKKILL.EXE (kills processes/programs[Next]: TYPEPERF.exe, A cmdline PERFMON (performance monitor)
\->Windows Commands->TYPE (displays contents of a file)

TYPE (displays contents of a file)

Apart from its obvious use to display the contents of a file it has an important side effect. Some windows commands/programs return "UNICODE" text and Windows doesn't support this very well, if your not getting the results you want UNICODE can be the reason. The file can easily be converted to ASCII by the type command:

TYPE unicode-file.txt > ascii-file.txt

The "WMIC.exe" command is an example of a command that generates UNICODE. Use a hex editor such as "HxD" to examine the file and you will see all the "00" (null) bytes as well as a 2 byte header.

SYNTAX: TYPE /?

Displays the contents of a text file or files.

TYPE [drive:][path]filename


Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.Please email me any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Prev]: TASKKILL.EXE (kills processes/programs[Next]: TYPEPERF.exe, A cmdline PERFMON (performance monitor)


ScriptingTipsAndTricks© is (C)opyright Dennis Bareis 2003-2008 (All rights reserved).
Sunday September 07 2014 at 12:50pm
Visit ScriptingTipsAndTricks's Home Page
Microsoft awarded me an MVP (Most Valuable Professional award) in 2004, 2005, 2006, 2007, 2008 & 2009 for the Windows SDK (Windows Installer) area.