Error with Shift+Enter on Batch Files

English support forum

Moderators: white, Hacker, petermad, Stefan2

User avatar
pdavit
Power Member
Power Member
Posts: 1529
Joined: 2003-02-05, 21:41 UTC
Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
Contact:

Error with Shift+Enter on Batch Files

Post by *pdavit »

I’m getting the following error when a press Shift+Enter on a batch file I have created: TotalCmd displays an error message “File not found!” when I press Shift+Enter on the batch file. If I press just Enter the execution is fine but since you don’t get to read the output of the execution (normal TC behavior) I need to use the Shift+Enter shortcut getting the aforementioned error. Any ideas what causes the problem? Is this a known issue on the compatibility of batch files with Shift+Enter?

I’m using MS Windows 2000 SP3 with v5.51 of TotalCmd.

Thanks in advance.
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

You should have noclose.pif file in your Windows directory.
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
User avatar
pdavit
Power Member
Power Member
Posts: 1529
Joined: 2003-02-05, 21:41 UTC
Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
Contact:

Post by *pdavit »

I don’t want to skip TC’s normal behavior if this will be the outcome by having this file in my Windows directory. There are certain cases where I need the window closed! Or am I missing something here?
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

This is just from TC Help (Command line: keys):
SHIFT-ENTER - Similar to ENTER, but with preceding command /c. After the called DOS program is terminated, its window is not automatically closed. This will only work if the file noclose.pif is in your Windows directory.
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
User avatar
pdavit
Power Member
Power Member
Posts: 1529
Joined: 2003-02-05, 21:41 UTC
Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
Contact:

Post by *pdavit »

djk wrote:This is just from TC Help (Command line: keys):
SHIFT-ENTER - Similar to ENTER, but with preceding command /c. After the called DOS program is terminated, its window is not automatically closed. This will only work if the file noclose.pif is in your Windows directory.
It's not present in my Windows directory. I checked for hiden files also and I even did a search. The file is nowhere to be found!!!
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

pdavit wrote:
djk wrote:This is just from TC Help (Command line: keys):
SHIFT-ENTER - Similar to ENTER, but with preceding command /c. After the called DOS program is terminated, its window is not automatically closed. This will only work if the file noclose.pif is in your Windows directory.
It's not present in my Windows directory. I checked for hiden files also and I even did a search. The file is nowhere to be found!!!
You probably have some other pif files, eg. _default.pif. Just copy it to noclose.pif and click on it with the right button of your mouse. In the settings (I don;t know how the point is called in English versions of Windows) write only "command.com" in the "Program" tab in the command field. It should work.
Or I can send you my one. ;-)
PS.
I work on WinNT but I suppose it also works on Win2000
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
poiuytr
Senior Member
Senior Member
Posts: 243
Joined: 2003-02-23, 17:33 UTC

Post by *poiuytr »

pdavit
Also you can download noclose.pif from here.
djk wrote:... In the settings (I don;t know how the point is called in English versions of Windows)...
It's called "properties"
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

poiuytr wrote:pdavit

djk wrote:... In the settings (I don;t know how the point is called in English versions of Windows)...
It's called "properties"
Of course.. properties.... :-) I'm too long at work today.... I should rest a liitle bit... ;-)
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
User avatar
pdavit
Power Member
Power Member
Posts: 1529
Joined: 2003-02-05, 21:41 UTC
Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
Contact:

Post by *pdavit »

Thanks for the valuable help guys. That did the trick! ;-)
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
User avatar
Valentino
Power Member
Power Member
Posts: 706
Joined: 2003-02-07, 00:21 UTC
Location: Ukraine

Post by *Valentino »

2pdavit
Just a tip for the future: noclose.pif can be also taken from TC installation (SFX archive).
Probably you didn't install TC but just unpacked its files manually from the distribution SFX archive and forgot to copy all pif files from Windows subdir.
User avatar
pdavit
Power Member
Power Member
Posts: 1529
Joined: 2003-02-05, 21:41 UTC
Location: Kavala -> Greece -> Europe -> Earth -> Solar System -> Milky Way -> Space
Contact:

Post by *pdavit »

Valentino wrote:2pdavit
Just a tip for the future: noclose.pif can be also taken from TC installation (SFX archive).
Probably you didn't install TC but just unpacked its files manually from the distribution SFX archive and forgot to copy all pif files from Windows subdir.
You are correct. Thanks for the info!
"My only reason for still using M$ Window$ as an OS is the existence of Total Commander!"
Christian Ghisler Rules!!!
FRANCISCO J. ARRILLAGA
Junior Member
Junior Member
Posts: 13
Joined: 2003-05-12, 13:58 UTC

Error with Shift+Enter on Batch Files

Post by *FRANCISCO J. ARRILLAGA »

The same problem appears when I try to execute a program with a name not in form 8.3 (i.e. the name contains 9+ characters). I think that the problem appears only within W2000, but I'm not sure...

If I use the equivalent name with name in 8 characters, the program runs OK.

I have tried use in NOCLOSE.PIF the command COMMAND.COM and CMD.EXE, but the error remains.
User avatar
JackFoo
Senior Member
Senior Member
Posts: 373
Joined: 2003-02-05, 19:53 UTC
Location: ERROR

Post by *JackFoo »

The same problem appears when I try to execute a program with a name not in form 8.3 (i.e. the name contains 9+ characters). I think that the problem appears only within W2000, but I'm not sure...
What program are you trying to execute? And what "error remains"?
FRANCISCO J. ARRILLAGA
Junior Member
Junior Member
Posts: 13
Joined: 2003-05-12, 13:58 UTC

Error with Shift+Enter on Batch Files

Post by *FRANCISCO J. ARRILLAGA »

The error do not appears when I use Shif+Enter in the window panel from Total Commander, but when I put whathever program in the command line suplied for Total Commander. I have used many programs and ALL program (batch process) having a name with 8+ letters, executed from the command line, with Shift+Enter shows the message "bad command or file name" in the popup windows of DOS (which do not close, because I use Shift-Enter). If I use the equivalent name in 8 characters, the program or batch process runs OK. If I execute the program with "enter" in the command line, it runs OK.
there is a simple way to test this: rename some program or batch process with a name having 8+ characters, use CTRL+Enter in order to put the program in the command line, and try to execute-it with Shift-Enter.
The "error" remains means that the message "Bad command or file name" appears in the DOS window.
User avatar
JackFoo
Senior Member
Senior Member
Posts: 373
Joined: 2003-02-05, 19:53 UTC
Location: ERROR

Post by *JackFoo »

You do know that if your program/path to it contain spaces you'll need to use ["]; Example:
c:\my programs\my program.exe : will NOT run because of spaces
"c:\my programs\my program.exe" : will run

If the above doesn't help, show an example.

Cheers.
Post Reply