[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖

[其他] 【有奖翻译】T002:命令行工具Mtee2.0(命令行标准流分配器)

【活动说明】http://bbs.bathome.net/thread-2991-1-1.html

【官方下载】http://www.commandline.co.uk/mtee/index.html

【本地下载】http://bcn.bathome.net/s/tool/index.html?key=mtee

【任务内容】

MTEE Commandline Standard Stream Splitter [v2.0] for Windows NT4/2000/XP/2003

About Mtee

Mtee is a commandline utility that sends any data it receives to the console and to any number of files. Useful if you want to watch and record the output from a batch file or program.

Mtee is an 11kb standalone executable. It does not create any temporary files or write to the registry. There is no installation procedure, just run it. To remove all traces of Mtee from your system, just delete it.

Mtee is simple to use and only has several options. To list them, type mtee/?.

Note for W9x/ME users: Mtee v2.0 will only run on Windows NT4/2000/XP/2003. Please use Mtee v1.1. If you want redirect, capture or tee stderr, I recommend the free Win95Cmd utility. This will allow you to use the same redirection syntax that Windows NT4/2000/XP/2003 offers.

What's New

The following features are new to Mtee v2.0

Read and output unicode
Convert ANSI to unicode (and vice-versa)
Reads text and binary data without performing any character translations
Support for unicode filenames of ~32,000 characters
Smaller than ever. Mtee is now just 11kb (and no, it's not compressed!)

Parameters

MTEE [/A | /U] [/C] [/D] [/T] [[/+] file] [...]

/A Convert output to ANSI. Default output is the same as input
/C Continue if errors occur opening/writing to file (advanced users only)
/D Prepends each line with local date in YYYY-MM-DD format (ISO-8601).
/T Prepends each line with local time in HH:MM:SS.MSS format (ISO-8601).
/U Convert output to Unicode. Default output is the same as input
/+ Append to existing file. If omitted, existing file is overwritten
file File to receive the output. File is overwritten if /+ not specified
... Any number of additional files. Use /+ before each file to append
The parameters can be specified in any order. The only requirement is that the /+ switch, if used, must be followed by a filename.

Examples

View Mtee help screen:-
  1. mtee/?
复制代码
Send the output of script.cmd to the console and to RESULT.LOG. If RESULT.LOG already exists, it will be overwritten:-
  1. script.cmd | mtee result.log
复制代码
Send the output of the automated ftp session to the console and to two log files, LOCAL.LOG is overwritten if it already exists. REMOTE.LOG is appended to if it exists, otherwise it is created:-
  1. ftp -n -s:ftp.scr | mtee local.log /+ \\server\logs\remote.log
复制代码
Make two copies of LOG whilst viewing LOG on the screen. If NEW1 and NEW2 already exist, they are overwritten:-
  1. mtee < log new1 new2
复制代码
Redirect stdout and stderr from UPDATE.CMD to the console and appends to LOG.TXT. Each line is prefixed with local date and time:-
  1. update.cmd 2>&1 | mtee/d/t/+ log.txt
复制代码
Send the output from BACKUP.CMD to the console and two remote log files. If there is an error opening any of the log files (server offline for instance) MTEE will continue. If the destination files already exist, they are appended to:-
  1. backup.cmd | mtee /c/+ \\svr1\log$\bu.log /+ \\svr2\logs$\bu.log
复制代码
Make multiple carbon copies of patch.exe:-
  1. type patch.exe|mtee \\pc1\c$\patch.exe \\pc2\c$\patch.exe \\pc3\c$\patch.exe
复制代码
Make a unicode log of HFNETCHK:-
  1. hfnetchk|mtee/u log
复制代码
Display stdout on the console, and stderr on the console and also to a log file with each line of stderr prefixed with local date and time:-
  1. batch.cmd 2>&1 1>&3 3>&1 |mtee/t/d log
复制代码
【获奖名单】

lhjoanna +30

【活动结束】

2009-03-02
我帮忙写的代码不需要付钱。如果一定要给,请在微信群或QQ群发给大家吧。
【微信公众号、微信群、QQ群】http://bbs.bathome.net/thread-3473-1-1.html
【支持批处理之家,加入VIP会员!】http://bbs.bathome.net/thread-67716-1-1.html

回复 2楼 的帖子

已加入有奖翻译活动
我帮忙写的代码不需要付钱。如果一定要给,请在微信群或QQ群发给大家吧。
【微信公众号、微信群、QQ群】http://bbs.bathome.net/thread-3473-1-1.html
【支持批处理之家,加入VIP会员!】http://bbs.bathome.net/thread-67716-1-1.html

TOP

返回列表