sftp "cd" command to drive letter under cygwin

Corinna Vinschen vinschen at redhat.com
Wed Jan 9 20:36:26 EST 2013

On Jan  8 16:57, Rick Patterson wrote:
> HI, Corinna.  
> > However, DOS paths are only barely supported. The right thing to do is
> > NOT to use DOS paths, but the equivalent POSIX path. This is also
> > documented in the User's Guide:
> >
> > http://cygwin.com/cygwin-ug-net/using.html#pathnames-win32
> >
> I've seen that message before, and do not agree with it. Cygwin should
> make Windows easier for Windows developers, not harder by recommending
> they map all files to a different file system.

I'm sorry if you don't agree to the project goals, but that's how they
are.  Other projects have other goals.  What you are asking for is
supposed to be supported by a native sftp implementation like WinSCP.

> [...]
> A typical application is not just all Cygwin, but has to work with
> other existing applications and databases, which might only normally
> know about "Windows" files and "UNIX" files.  There's usually no
> support in other applications for "Windows machine but with POSIX file
> system".

You're mixing apples and oranges.  Cygwin is a POSIX emulation layer
and thus clearly dedicated to the POSIX side of things.  However,
just because Cygwin applications should use POSIX paths doesn't mean
it's impossible to run non-Cygwin Windows applications from a Cygwin
bash or any other Cygwin application.

And there *are* officially supported ways to convert from POSIX to
DOS paths and vice versa:


> For example: in regards to your next comment:
>    >There's no reason to change anything. Don't use DOS paths in Cygwin applications.
> We don't have a "Cygwin" application.  We have a Windows application

Yes, you have a Cygwin application.  You can choose to run the Cygwin
sftp or a native Windows sftp.   If you use Cygwin sftp, you're in
POSIX land.  If you want to remote control Cygwin sftp from a native
Windows environment, consider using cygpath.

> that if you wish to use commands from a UNIX subsystem (various ones
> are available) then that can be accommodated. For example, sftp is a
> typical third-party add-on Windows application.  Our application might

No, it's not.  Cygwin sftp is cleanrly a Cygwin application.


Corinna Vinschen
Cygwin Project Co-Leader
Red Hat

More information about the openssh-unix-dev mailing list