Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Wed, 14 Jul 2004 13:45:14 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: scp with DOSish paths
Message-ID: <20040714114514.GA12722@cygbert.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <F0D7281DAB048B438E8F5EC4ECEFBDDC1760E5@esmail.elsag.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <F0D7281DAB048B438E8F5EC4ECEFBDDC1760E5@esmail.elsag.de>
User-Agent: Mutt/1.4.2i

On Jul 14 10:59, J?rg Schaible wrote:
> Hello,
> 
> can anything be done (environmetn variable, option ?), that would allow scp to support DOSish absolute paths?

Nope.

> $ pwd
> /cygdrive/c
> 
> $ scp 'C:\test\file.txt' host:/target/
> ssh: C: no address associated with name

foo:bar is the rsh/csh syntax for host:file, so no go here for DOS paths
with drive letter.

> $ scp '\test\file.txt' host:/target/
> \test\file.txt: No such file or directory

That works for the \foo\bar path on the source side, but it will
expanded incorrectly on the host side which will think that the new
file has to get the name /target/\test\file.txt.

It works as you like if the call explicitely uses the destination file name:

  scp '\test\file.txt' host:/target/file.txt

Corinna

> 
> $ scp 'test\file.txt' host:/target/
> test\file.txt                                                    100% 7395     7.2KB/s   00:00 
> 
> 
> Background: scp is called by a Java application (Maven) and I cannot even wrap the call with a script.

Sure you can.  Create a script called "scp" which is in Maven's $PATH
before /usr/bin.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Co-Project Leader          mailto:cygwin@cygwin.com
Red Hat, Inc.

--
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/

