IF EXIST c:\autoexec.bat type
c:\autoexec.bat|find /v/i "c:\banner.exe">c:\tempban.bat
I receive this error onscreen:
The process tried to write to a nonexistent pipe.
This is written to the tempban.bat file:
FIND:Invalid Switch
additional info:
* an autoexec.bat file exists but doesn't include
the "c:\mcbanner.exe" string.
** tempban.bat doesn't exist prior to executing the batch file
tempban.bat doesn't exist.
What's wrong here???
Got questions? Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com
Put a space between the /v and the /i, and also you probably want a space on
either side of the pipe "|".
Very interesting: you have only to put a space between the two
find-switches...
IF EXIST c:\autoexec.bat type c:\autoexec.bat|find /v /i
"c:\banner.exe">c:\tempban.bat
HTH, Peter
BTW post your NT/2K related batch question to news:alt.msdos.batch.nt
--
Frank-Peter Schultze, http://www.fpschultze.de
Permanent Mail: mailto:fpsch...@bigfoot.de
AFAIK: if questions don't like pipes:
if condition type files | find /v/i "text"
It is not the space or not space between /v and /i. Intead of this try:
set ae=c:\autoexec.bat
if exist %ae% type find /v/i "banner.exe" < %ae% > c:\foo.bar
HTH
Georg Pohl
--
Email: Pohl...@compuserve.de
Website: http://www.online-club.de/~Eulenspiegel
Freeware for DOS/Windows, C-Libraries
Real good old nonsense !!!
It sould be:
if exist %ae% find /v/i "banner.exe < %ae% > c:\foo.bat
Sorry for this mistake
Georg Pohl