This is probably going to elicit a "RTFM" (haha), but on first glance I couldn't find the answer to this question.
Is it possible to have Xplorer2 generate a .cmd file instead of a .bat file when using the Command script function?
I thought I had read way back in the mists of time that .cmd files are more "native" for Win 2000 (read: 32bit) and that .bat files possibly call or open a 16-bit command function.
Don't know the relevance to this topic, if any, but does it make a difference if Xplorer2 is set to use the normal command console rather than the Xplorer2 console?
I happen to find the normal console snappier in response, and it also obeys the exit command The Xplorer2 console is so much more powerful, but slower to close and thumbs its nose at "exit."
to be honest, i've never heard of cmd files before so i can't tell
try editing the script and save it as cmd to see if it is executed and how
console2 is meant to stick around for the duration of the program
you can "exit" by clicking on the X (close) button
but that goes against the design i had in mind
you can disable console2 altogether from Tools | Options
nice!
so it means you get access to more powerful command options
however x2 scripts usually do repetitive and simple actions so i doubt there's going to be any advantage either way
btw, console2 runs cmd.exe so batch files run through it
of course it could be that it launches another command processor behind the scenes...
nikos wrote:[...]btw, console2 runs cmd.exe so batch files run through it
of course it could be that it launches another command processor behind the scenes...
Yep, that's what it does. To execute a .bat file it needs an instance of command.com, so cmd.exe launches an instance.
It would be nice Nikos if X² would generate .cmd files on platforms which support this (Win2000 and up), simply because it is quicker in execution and more 'native' to the platform. You already have a mechanism for determining which version of Windows is running under the hood I think...
"CMD.EXE passes all .BAT files to Windows NT's DOS command processor, typically COMMAND.COM, for execution (yes, there is a skeletal DOS command processor in Windows NT!). COMMAND.COM handles a few DOS-related commands, but passes most internal commands to a second copy of CMD.EXE so that they are executed in the Windows NT environment. This convoluted system allows you to load memory-resident DOS programs (TSRs), and run other programs which use them, all from the same .BAT file. However, it reduces performance for all .BAT files in order to support those rare files which load DOS TSRs under Windows NT."
JRz wrote:It would be nice Nikos if X² would generate .cmd files on platforms which support this (Win2000 and up), simply because it is quicker in execution and more 'native' to the platform. You already have a mechanism for determining which version of Windows is running under the hood I think...
This is an older thread, but I'd like to second JRz's suggestion about changing the x2tmpScript.bat to x2tmpScript.cmd -- at least for Win2K and up.
Can't imagine it would be that difficult. Other than the OS detection code, wouldn't it simply be a matter of three characters changed (bat to cmd) in the source code? Dunno about the compiled .exe
If this is too low priority or Nikos says forget it, is there a simple way to change this with a Hex editor?