This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Why does robocopy confuse input and output files defined with Cygwin/bash and perl?

Greetings, Eliot Moss!

> Dealing with "odd" characters like \ and such can be a pain, huh?
> Perhaps it will help you to know that bash will expand variables
> inside double-quoted arguments, i.e., "${src}".  (You can write
> "$src" if you want, but over the years I am finding it clearer /
> better to use the { } to make clear the name of the variable I
> want expanded.)

> Also, you may find the cygpath utility helpful, and the $( ) idiom
> of bash.

It isn't "idiom of bash", it is a POSIX construction.

> Thus:

> robocopy /s "$(cygpath -w /cygdrive/c/Users/siegfriend/Documents/bin)" "$(cygpath -w
> /cygdrive/f/backup/unison/bin)"

> I believe this will do what you want.  cygpath can be very helpful
> hen you desire to run a Windows program from the cygwin environment.

I would suggest cygpath -m.

With best regards,
Andrey Repin
Wednesday, September 30, 2015 22:26:55

Sorry for my terrible english...

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]