Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Echo Command Opens New Window

330 views
Skip to first unread message

Peter

unread,
Nov 26, 2015, 8:38:44 AM11/26/15
to
When running my batch files on Windows 10 PCs the Echo command causes a new command window to open. That did not happen in Win7 or before. Is there any way to get Echo not to open a new window?

Thanks.
Peter

Note: I posted this same message earlier today. It was on for a while but then disappeared. If I'm doing something wrong please tell me.

frank.w...@gmail.com

unread,
Nov 26, 2015, 10:27:59 AM11/26/15
to
From Peter:
>When running my batch files on Windows 10 PCs the Echo
command causes a
>new command window to open. That did not happen in
Win7 or before. Is
>there any way to get Echo not to open a new window?

See if there is a file named "echo" somewhere. Try
inserting this line in the script:

which echo

I haven't used Windows in a few years so maybe 'which'
should be 'where'.

Frank

Tom Del Rosso

unread,
Nov 26, 2015, 4:05:08 PM11/26/15
to
Peter wrote:
> When running my batch files on Windows 10 PCs the Echo command causes
> a new command window to open. That did not happen in Win7 or before.
> Is there any way to get Echo not to open a new window?


Search for a program called echo.exe or echo.bat, etc.

Just do a file search for ECHO.*

Windows file search tool is crap, so also try it from the command
line...

DIR /S/A C:\ECHO.*

--


Tom Del Rosso

unread,
Nov 26, 2015, 4:09:27 PM11/26/15
to
I never heard of those, so don't know what version might have them.

I use a batch file:

D:\UTIL\FINDEXE.CMD

@echo off
rem search without adding ext
if not "%~$path:1"=="" echo %~$path:1

rem try adding each ext in pathext variable
if not [%1]==[] (
for %%e in (%pathext%) do (
for %%f in (%1%%e) do (
if not "%%~$path:f"=="" (
echo %%~azt$path:f
)
)
)
)


--


B00ze

unread,
Nov 26, 2015, 8:36:12 PM11/26/15
to
On 2015-11-26 16:09, Tom Del Rosso
<fizzbin...@that-google-mail-domain.com> wrote:

> I never heard of those, so don't know what version might have them.
>
> I use a batch file:
>
> D:\UTIL\FINDEXE.CMD
>
> @echo off
> rem search without adding ext
> if not "%~$path:1"=="" echo %~$path:1
>
> rem try adding each ext in pathext variable
> if not [%1]==[] (
> for %%e in (%pathext%) do (
> for %%f in (%1%%e) do (
> if not "%%~$path:f"=="" (
> echo %%~azt$path:f
> )
> )
> )
> )

Woa, excellent little script! I made a "FindInPath" script a long time
ago, but I ended-up parsing the PATH manually one entry by one entry,
doing a If Exist on each element of the path; I never even noticed that
there was %~$path! This is so much easier! Thanks!

Regards,

--
! _\|/_ Sylvain / B00...@hotmail.com
! (o o) Member-+-David-Suzuki-Fdn/EFF/Red+Cross/Planetary-Society-+-
oO-( )-Oo Windows error 08 Broken window, watch for glass fragments.

Peter

unread,
Nov 27, 2015, 10:51:12 AM11/27/15
to
On Thursday, November 26, 2015 at 10:27:59 AM UTC-5, frank.w...@gmail.com wrote:
>
> See if there is a file named "echo" somewhere. Try
> inserting this line in the script:
>
> which echo
>
> I haven't used Windows in a few years so maybe 'which'
> should be 'where'.
>
> Frank

Thanks for the reply. I think I need to explain the situation better.

1. My batch files are working fine in Win10.

2. I use the Echo command in my longer batch files to put text on the screen to show me their progress as they are executing.

3. In Win7 and before, when my batch ran a command window opened and every command along the way was shown in the command window - until the batch file completed at which time the command window closed. In Win10, a command window opens as usual but a new additional command window opens every time the Echo command appears in the batch file.

This is NOT a problem (the batch files run properly) but it is an annoyance. With multiple command windows open it makes it difficult for me to follow the progress.

I'm just looking for a way to get the Echo command to behave in Win10 the way it behaved in Win7.

Thanks.
Peter

Herbert Kleebauer

unread,
Nov 27, 2015, 1:15:44 PM11/27/15
to
On 27.11.2015 16:51, Peter wrote:

> 3. In Win7 and before, when my batch ran a command window opened and
> every command along the way was shown in the command window - until
> the batch file completed at which time the command window closed. In
> Win10, a command window opens as usual but a new additional command
> window opens every time the Echo command appears in the batch file.

Can you post an example batch file which shows this behavior. I don't
think that an external echo program the problem, because echo is an
internal command.

echo 123

should always use the internal echo whereas

"echo" 123

first search for an external echo.com echo.exe or echo.bat in the
current directory or somewhere in the PATH.


foxidrive

unread,
Nov 27, 2015, 6:03:27 PM11/27/15
to
On 28/11/2015 05:15, Herbert Kleebauer wrote:
> On 27.11.2015 16:51, Peter wrote:
>
>> In Win10, a command window opens as usual but a new additional command
>> window opens every time the Echo command appears in the batch file.
>
> Can you post an example batch file which shows this behavior. I don't
> think that an external echo program the problem, because echo is an
> internal command.


> "echo" 123
>
> first search for an external echo.com echo.exe or echo.bat in the
> current directory or somewhere in the PATH.

call echo <--- also launches an echo.bat


The behaviour of Peter's Windows 10 is certainly abnormal

Peter, can you run this script to confirm the issue?
I'm being simplistic on purpose, to confirm that the problem is always present.

@echo aaa
@echo bbb
@pause





Tom Del Rosso

unread,
Dec 22, 2015, 7:24:15 PM12/22/15
to
B00ze wrote:
> On 2015-11-26 16:09, Tom Del Rosso
> <fizzbin...@that-google-mail-domain.com> wrote:
>
>> I never heard of those, so don't know what version might have them.
>>
>> I use a batch file:
>>
>> D:\UTIL\FINDEXE.CMD
>>
>> @echo off
>> rem search without adding ext
>> if not "%~$path:1"=="" echo %~$path:1
>>
>> rem try adding each ext in pathext variable
>> if not [%1]==[] (
>> for %%e in (%pathext%) do (
>> for %%f in (%1%%e) do (
>> if not "%%~$path:f"=="" (
>> echo %%~azt$path:f
>> )
>> )
>> )
>> )
>
> Woa, excellent little script! I made a "FindInPath" script a long time
> ago, but I ended-up parsing the PATH manually one entry by one entry,
> doing a If Exist on each element of the path; I never even noticed
> that there was %~$path! This is so much easier! Thanks!
>
> Regards,

I just noticed that I left out the azt on the third line.
It provides a little useful info. :)


@echo off
rem search without adding ext
if not "%~$path:1"=="" echo %~azt$path:1

rem try adding each ext in pathext variable
if not [%1]==[] (
for %%e in (%pathext%) do (
for %%f in (%1%%e) do (
if not "%%~$path:f"=="" (
echo %%~azt$path:f
)
)
)
)


--


0 new messages