8

I installed new version of MSysGit and now I am not able to run *.bat files directly from command line("called MINGW64").

I try to search it, but I only saw options which needs run cmd first. Out of a git console: how do I execute a batch file and then return to git console? cmd "/C clean.bat"

Is there some option to just run the clean.bat?

Thank you very much


I solve that by updating all libraries... Maybe Cygwin? I am not sure, but update all your software and it works.

Manic Depression
  • 922
  • 1
  • 14
  • 27
  • Maybe a shebang at the start of the file such as `;!cmd.exe /c`? Other than that, no, there probably isn't a way to do what you're asking. –  Oct 24 '15 at 05:55
  • 3
    You have to use cmd.exe , as windows isn't smart enough to know which shell can execute a batch file – jeb Oct 24 '15 at 08:42
  • When I use old version of MSysGit, I can run directly `clean.bat` – Manic Depression Oct 24 '15 at 13:15
  • Why not make a `bash` alias instead of using a batch file? Or make a `clean` alias that will run `cmd /c clean.bat`. – wOxxOm Oct 24 '15 at 16:08

1 Answers1

9

Try this from MINGW command line

$ cmd <test.bat
Guest77734
  • 91
  • 1
  • 2