delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/04/22/09:35:21

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; q=dns; s=default; b=WjC6Nvfij00OVFQ8
WBGuKMVoSE7XDIBEqu2g/v0rX6NGpcAdqpnpn47cu5syGO39Rr0CNzUGFBGV5T00
+tMTZpoL2NoM+IFeNs7aHoQ2kiBHRkCIPuj8wcFiH8vgS+GIwI7Gxfsfpq0qk72C
aL99pMaKPVTj/+2TB0o596p8/HM=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; s=default; bh=CPpoDq1/hBDpr2oPotUXCn
P6N44=; b=GpMXZbtN0t7DiBrhyY9jvp5qhs/yKbE9Nu5sKSoyZfxp3XJ/lNhlHm
+cnBbU1k1vTztodfVFmAOjI+y/5S7YImQ4AvCehgvR8c0QmqX1hid+DH99hLNJdP
sZBTIYKIEzRlBjmXuUUHECEwxMCtCBx2lUv8VkiJWjYTjeEqgWdks=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=0.7 required=5.0 tests=BAYES_05,FREEMAIL_FROM,KAM_THEBAT,MIME_BASE64_BLANKS,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=english, H*F:D*yandex.ru, Press, mangling
X-HELO: forward106j.mail.yandex.net
Authentication-Results: smtp3o.mail.yandex.net; dkim=pass header.i=@yandex.ru
Date: Sun, 22 Apr 2018 16:25:42 +0300
From: Andrey Repin <anrdaemon AT yandex DOT ru>
Reply-To: cygwin AT cygwin DOT com
Message-ID: <1995428989.20180422162542@yandex.ru>
To: Ulli Horlacher <framstag AT rus DOT uni-stuttgart DOT de>, cygwin AT cygwin DOT com
Subject: Re: path parameter via cmd batch?
In-Reply-To: <20180417153528.GA11214@rus.uni-stuttgart.de>
References: <20180417153528 DOT GA11214 AT rus DOT uni-stuttgart DOT de>
MIME-Version: 1.0
X-IsSubscribed: yes
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id w3MDZJIP012911

Greetings, Ulli Horlacher!

> I want to start a cygwin program via a cmd batch script.

> I have:

> C:\cygwin>type runcmd.bat
> @echo off

> C:
> chdir C:\cygwin\bin

> bash --login -c "%*"

Try

bash --login -c '%*'

> echo.
> pause



> But when I start it I get:

> C:\cygwin>runcmd.bat xxx \cygwin\runcmd.bat
> xxx: cannot read cygwinruncmd.bat

> Press any key to continue . . .


> I know the problem: the Windows \ path separator is the bash escape
> character. My programm xxx does not see "\cygwin\runcmd.bat", but
> "cygwinruncmd.bat", so I cannot convert the path string with xxx.

> What can I do?

You can not use bash to start your program.
Then you won't be plagued by its mangling.

> The final aim is to have a "send to" service in the windows explorer where
> I can send any file or directory to xxx for processing.

Well… do it?


-- 
With best regards,
Andrey Repin
Sunday, April 22, 2018 16:24:15

Sorry for my terrible english...
--
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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019