public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* how to get into dos mode & run .bat or .cmd file
@ 2011-08-17 20:26 J.V.
  2011-08-17 20:35 ` Eliot Moss
  0 siblings, 1 reply; 2+ messages in thread
From: J.V. @ 2011-08-17 20:26 UTC (permalink / raw)
  To: cygwin

I want a bash / shell script that I can run that will go into dos mode, 
and from there run a .bat or a .cmd script automatically.

After much googl'ing and experimenting, I cannot quite get it to run a 
dos shell and run a .bat or .cmd.

any help would be appreciated.


J.V.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: how to get into dos mode & run .bat or .cmd file
  2011-08-17 20:26 how to get into dos mode & run .bat or .cmd file J.V.
@ 2011-08-17 20:35 ` Eliot Moss
  0 siblings, 0 replies; 2+ messages in thread
From: Eliot Moss @ 2011-08-17 20:35 UTC (permalink / raw)
  To: cygwin

On 8/17/2011 4:26 PM, J.V. wrote:
> I want a bash / shell script that I can run that will go into dos mode, and from there run a .bat or
> a .cmd script automatically.
>
> After much googl'ing and experimenting, I cannot quite get it to run a dos shell and run a .bat or
> .cmd.
>
> any help would be appreciated.

If you have a .bat file named foo.bat, then you can run
simply by:

foo.bat

from a bash command line or shell script file.  You can pass
arguments as well.  There is no automatic conversion between
Windows and cygwin/Unix-style paths, so you may find the
cygpath utility helpful.

I am not sure what "going into dos mode" would mean, but you
can also run cmd.exe from the command line by typing:

cmd

In the case of both cmd and foo.bat, their directories need
to be in your search path, or else offered explicitly.

Best wishes -- Eliot Moss

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-17 20:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-17 20:26 how to get into dos mode & run .bat or .cmd file J.V.
2011-08-17 20:35 ` Eliot Moss

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).