delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/07/14/07:45:39

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Date: Wed, 14 Jul 2004 13:45:14 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: scp with DOSish paths
Message-ID: <20040714114514.GA12722@cygbert.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <F0D7281DAB048B438E8F5EC4ECEFBDDC1760E5 AT esmail DOT elsag DOT de>
Mime-Version: 1.0
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 AT cygwin DOT 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/

- Raw text -


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