X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: Date: Fri, 25 Jan 2008 16:54:59 +0100 From: "Mirco Piccin" To: cygwin AT cygwin DOT com Subject: Re: Cygwin - batch file In-Reply-To: <15089652.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <15088393 DOT post AT talk DOT nabble DOT com> <15089652 DOT post AT talk DOT nabble DOT com> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Sorry but my english is quite poor, so i don't understand well your question. So, correct me if i'm going wrong. > it works perfect, but i have to give the cygwin script under C:\Documents > and Settings\user myscript.ksh! > > how can i make it to have a directory, for eg C:\mybatchconversion where all > files are there? You want to run with cygwin a .ksh file stored in "C:\Documents and Settings\user" ? Well, in cygwin the system drive are mapped in this way : $ mount C:\cygwin\bin on /usr/bin type system (binmode) C:\cygwin\lib on /usr/lib type system (binmode) C:\cygwin on / type system (binmode) c: on /cygdrive/c type system (binmode,noumount) ...so i can do: $ cd /cygdrive/c/Documents\ and\ Settings// ...to switch to Win home directory. I recommend to soft link your Windows home directory (C:\Documents and Settings\) to the linux home folder (/home/) in this way: $ mv /home// /home/.old/ (move the original folder to another) $ ln -s /cygdrive/c/Documents and Settings/ /home/ (link the Win home dir to cygwin linux home dir) $ cp -R /home/.old/ * /home//. (right to have the .profile .bash* file) In this way, cd to /home/ and you will find yourself in your Win home dir. Of course, you can soft link any other path. Remeber only that the Windows C: drive in cygwin environment is /cygdrive/c/. So, coming back to our .bat file: .... bash --login -i -c '/cygdrive/c/Documents and Settings//script.ksh' ... -or, if you soft link Win home dir to /home/: ... bash --login -i -c '/home//script.ksh' ... Hope i understand well :-D M -- 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/