2

I have a set of batch files. Some of them are shortcuts to long running tasks, like an FTP server. I want to launch them in a separate tab, so that I can look at the output later. I've found the -new_console option, but it doesn't seem to work on batch files (while it does work on plain executables) - ftp.bat -new_console will run in the same console.

Is this by design? If so - is there a workaround?

UPD1: As I suspected, cmd /c ftp.bat -new_console did work. Looks like ConEmu doesn't count .bat or .cmd as executables. Though, the question remains the same.

Alec Mev
  • 4,663
  • 4
  • 30
  • 44

1 Answers1

2

When you type in your prompt "ftp.bat" cmd don't start new process, it reads file and execute it contents internally.

ConEmu process "-new_console" when shell create new process only.

So, if you need to start cmd/bat in new console - use "cmd /c " or alias for example. Also, you may use "-new_console" inside of batch file, when you starting ftp or any other process.

Maximus
  • 10,751
  • 8
  • 47
  • 65
  • I see. Would you consider adding a `-run_in_new_console` flag for batch files (or something shorter, maybe)? Or making `-new_console` more versatile? Putting that in the batch file itself isn't an option, since other people, who don't have ConEmu, may use it, and the alias approach would require me to create one for each batch file I need to run in a separate console. – Alec Mev Sep 19 '13 at 07:49
  • ConEmu does not change text typed by user in cmd prompt. Without that - it is impossible to process `-new_console` switch or anything else. – Maximus Sep 19 '13 at 22:56