This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: scp with DOSish paths
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/