CMD tricks.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Mon, 20 Apr 2009 20:05:18 +0300
changeset 99 0fa8ff78a008
parent 98 fc020f519c58
child 100 00a4b473325b
CMD tricks.
cmd.rst
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmd.rst	Mon Apr 20 20:05:18 2009 +0300
@@ -0,0 +1,9 @@
+-*- outline -*-
+
+* CMD tricks.
+
+  $ set /p TOOLOUTPUT= < temp.txt
+
+  $ for /f "tokens=*" %%i in ('%~dp0sometool.exe') do set TOOLOUTPUT=%%i
+
+  $ for /f "tokens=1 delims=" %%s in (users.txt) do (echo %%S & command "%%S") >> outputfile.txt