X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE,TW_YG X-Spam-Check-By: sourceware.org Message-ID: <1337356203.42647.YahooMailClassic@web28609.mail.ukl.yahoo.com> Date: Fri, 18 May 2012 16:50:03 +0100 (BST) From: Marilo Reply-To: narium85-mlscar AT yahoo DOT co DOT uk Subject: Re: Making Unix like paths work when using java program from Cygwin To: cygwin AT cygwin DOT com In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 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 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q4IFoWOP011256 --- On Fri, 18/5/12, Earnie Boyd wrote: > From: Earnie Boyd > Subject: Re: Making Unix like paths work when using java program from Cygwin > Date: Friday, 18 May, 2012, 16:15 > On Fri, May 18, 2012 at 11:11 AM, > Marilo wrote: > > The java aspect looks like a red herring as not > relevant to the problem. > > > > You want to run a *nix shell script and presumably > don't want to write your own bat file doing the same job. > > > > I'm probably missing something but given that there's > cygwin, and it's a *nux script, what about just editing the > script for your computer, amending the paths in the script, > with  a find and replace, so /ABC/XYZ is replaced with > /cygdrive/c/ABC/XYZ and running the script in cygwin. > > http://cygwin.com/acronyms/#TOFU > > Why invent that wheel when you have cygpath already to do > the job? > And java isn't going to understand /cygdrive/c either. > Still use /cygdrive/c in the shell script. I wasn't suggesting using /cygdrive/c in his java program. His java program is not so much a cygwin issue, as his shell script is. If his java program has file paths that need amending, then since you point out that a cygwin program could be used to help convert the paths in his java program, then, I see, the java program could be relevant to cygwin in that sense. Note java wouldn't understand "c:\blah\a.txt" it could have "c:\\blah\a.txt" though. A search and replace might be easier though, possibly using regex. How do you get cygpath to do make /v into c:\v ? $ cygpath -aw "/v" C:\cygwin\v and not that i'm suggesting it but out of curiousity, can cygpath take a file and convert any linux paths in it to windows paths? how? and if it can't then i'm not sure its use for this. -- 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