« Return to Thread: Cygwin - batch file

Re: Cygwin - batch file

by Larry Hall (Cygwin) :: Rate this Message:

Reply to Author | View in Thread

_alpine_ wrote:

> i understand a little bit your answer but it dont works right now!
>
> my start.bat is in the folder C:\batch
>
> when i call start.bat , cygwin automatically goes into the folder
> C:\Documents and Settings\user .
> so myscript.ksh file must be in C:\Documents and Settings\user.
>
> i want to have myscript.ksh file in the C:\batch folder!
> do u understand what i mean?
>
> and i only can start my script with ./myscript.ksh
>
> it should looks like this:
>
> C:
>
> chdir C:\cygwin\bin
>
> bash --login -i -c 'c:/batch./myscript.ksh'
> <<
>

I think you want this then:

C:

chdir c:\batch

c:\cygwin\bin\bash -c './myscript.ksh'

You can add the '-i' if your script requires it for some reason.

--
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

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

 « Return to Thread: Cygwin - batch file