Page 1 of 2
Configurable Command Prompt
Posted: 07 Nov 2007 23:31
by oli
Hi,
just recently i stumbled upon a nice little terminal replacement for the cmd.exe shell. it can be found at:
http://sourceforge.net/projects/console/
a nice little addition to xyplorer would be to be able to configure the 'Command Prompt' button to spawn any kind of terminal (cmd, cygwin, console, ...) in the current directory (via param).
cheers,
oli
Re: Configurable Command Prompt
Posted: 08 Nov 2007 08:56
by admin
XY calls what is returned by the %COMSPEC% environment var. Can you set this var to your replacement?
Posted: 08 Nov 2007 23:10
by oli
the thing is that console is not a replacement for a shell, but just provides an alternative terminal window for an arbitrary shell (like the *terms on unix). so setting the COMSPEC to console would not even be possible in that case.
Posted: 09 Nov 2007 00:39
by mwb1100
Console2 itself seems to use the COMSPEC variable to spawn a shell when it starts, so if console.exe is the COMSPEC you get a series of crashes as it tries to start itself over and over.
There's a basic command line capability in Console2, so it might be that UDCs could help here.
Posted: 09 Nov 2007 08:17
by admin
mwb1100 wrote:Console2 itself seems to use the COMSPEC variable to spawn a shell when it starts, so if console.exe is the COMSPEC you get a series of crashes as it tries to start itself over and over.
There's a basic command line capability in Console2, so it might be that UDCs could help here.
Yep, it should at least be able to read the startpath via command line. Today I'm going to add parameter-capability to the "Open" UDC. Then you would just create an UDC
Open "Console2" <curpath> .
Posted: 13 Nov 2007 10:27
by oli
thanks for addition of "open" parameters. i updated to version 6.50.0008 yesterday but i can't get the command to work.
i added this line as open cmd:
"D:\Program Files\Console2\Console.exe" -d "<curpath>"
tried it w/ and wo/ quotes around curpath.
a simple
"echo" <curpath> > c:\temp\out.txt
doesn't work either.
Posted: 13 Nov 2007 10:35
by admin
oli wrote:thanks for addition of "open" parameters. i updated to version 6.50.0008 yesterday but i can't get the command to work.
i added this line as open cmd:
"D:\Program Files\Console2\Console.exe" -d "<curpath>"
tried it w/ and wo/ quotes around curpath.
And what happens?
oli wrote:
a simple
"echo" <curpath> > c:\temp\out.txt
doesn't work either.
echo.exe is not an application.
Posted: 13 Nov 2007 10:48
by Gandolf
Same here, I tried several different programs expecting them to run (open) in the current directory - nothing happens.
Posted: 13 Nov 2007 11:02
by admin
Gandolf wrote:Same here, I tried several different programs expecting them to run (open) in the current directory - nothing happens.
Yes, bug. Fix is coming...
Posted: 13 Nov 2007 12:38
by Gandolf
And it's there - Thanks Donald.
Posted: 13 Nov 2007 13:53
by admin
Gandolf wrote:And it's there - Thanks Donald.
FYI, this Open-UDC:
"cmd" /k "cd <curpath>"
will open the DOS box at the current path.
"cmd" /k "cd <curpath>&&dir"
will open the DOS box at the current path, and show the directory listing.
Yep, "&&" is the command concatenator... did you know?
Posted: 13 Nov 2007 15:22
by serendipity
Posted: 14 Nov 2007 01:28
by oli
yeah, thanks! it works now..
Posted: 14 Nov 2007 20:47
by admin
But this is "How do you use it?". I don't use this trick, I just know it.

Re: Configurable Command Prompt
Posted: 27 Nov 2008 22:19
by Stefan
I searched but didn't find in XY-menu an command to open an DOS-Box with current folder as path ?!
I mean this is an must have feature. => Feature request, ==> maybe "File > Open DOS here" ?
-----
FYI, this Open-UDC:
"cmd" /k "cd <curpath>"
will open the DOS box at the current path.
This command above works now (2008, v7.80) with "Open with" action
I hope this is correct?
1.) User > Manage Commands
Action: Open With
[New]
Caption: Open DOS-Box here
Item:
cmd
Mode: Single
[OK]
If you want to execute this tool with an shortcut:
2.) Tools > Costumize Shortcuts
Category: Open With
Commands: Open DOS-Box here
Shortcut: Click on [All Free Shortcuts...] an pick one you like,
then give 'Press new shortcut:' the focus and press this shortcut-keys (i use Ctrl+O)
[Assign]
[OK]