Possible bug of executing batch file

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
sy8111
Junior Member
Junior Member
Posts: 19
Joined: 2006-12-11, 14:54 UTC

Possible bug of executing batch file

Post by *sy8111 »

When I shift+enter run following a.bat file:

Code: Select all

@echo off 

setlocal 

endlocal 
It says "bad file name or command" for setlocal and endlocal.

This works in windows cmd shell.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Shift+Enter runs noclose.pif, which then runs command.com - not cmd.exe. Perhaps you have a better idea how to solve this...
Author of Total Commander
https://www.ghisler.com
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

@sy8111:
Get rid of the internal noclose.pif and replace it with this intelligent idea:
http://flint-inc.ru/English/Descript/NoClose.html

Icfu
This account is for sale
User avatar
karlchen
Power Member
Power Member
Posts: 4603
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Addendum:
  • command.com does not know "setlocal"/"endlocal".
  • using Noclose as suggested by icfu, your batch file a.bat will be executed correctly from inside TC
Karl
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

The sad thing is that CMD files still don't work as expected in TC 7 when Shift+Enter is pressed:
http://www.ghisler.ch/board/viewtopic.php?p=121829

Icfu
This account is for sale
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Plus doc in French…

Post by *Clo »

2icfu

:) Hello Jeff !

• Obviously the best solution… I've installed it recently, Paul and I have made a nice French translation of the doc ;)
- I guess it might be part of the TC-installation now, an agreement between the two authors seems desirable,
the programme is not big, and should avoid a lot of such annoyances…
- Just my opinion, of course…

:mrgreen: VG
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
Post Reply