You are not logged in.
is it possible to
echo hello world > screen(like normal) & helloworld.txt?
Offline
Normally you need an external tee command for this, but if you only need it for one line at a time, you can write your own tee with batch.
@ECHO OFF
rem *** singleLineTee.bat destination1 [destination2]
rem *** If you only use one destination the second dest is stdout
setlocal EnableDelayedExpansion
set /p var=
> "%~1" echo(!var!
if "%~2"=="" (
echo(!var!
) ELSE (
> "%~2" echo(!var!
)
To use it
echo hello | singleLineTee myFile.txt
echo world | singleLineTee myFile.txt secondFile.txt
Offline
@echo off
:: echo hello world | teeCmd 1.txt
:: dir | teeCmd 1.txt 2.txt 3.txt ... 6.txt
::
for /f "delims=" %%z in ('more') do (
for %%a in (con %1 %2 %3 %4 %5 %6) do >>%%a echo(%%z
)
Offline
@Jumper: Nice extension
Offline