From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38234 invoked by alias); 30 Sep 2015 15:07:02 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 38204 invoked by uid 89); 30 Sep 2015 15:07:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: csmail.cs.umass.edu Received: from mdc1.cs.umass.edu (HELO csmail.cs.umass.edu) (128.119.240.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 30 Sep 2015 15:07:00 +0000 Received: from [192.168.0.8] (c-71-192-247-69.hsd1.ma.comcast.net [71.192.247.69]) by csmail.cs.umass.edu (Postfix) with ESMTPSA id EF2A5100002F16B595; Wed, 30 Sep 2015 11:06:54 -0400 (EDT) Reply-To: moss@cs.umass.edu Subject: Re: Why does robocopy confuse input and output files defined with Cygwin/bash and perl? References: <20150930075400.d50bba72719f91cdb61cd892ddf83b25.788987e5cc.wbe@email11.secureserver.net> To: siegfried@heintze.com From: Eliot Moss Cc: cygwin Message-ID: <560BFA8D.2050701@cs.umass.edu> Date: Wed, 30 Sep 2015 15:07:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20150930075400.d50bba72719f91cdb61cd892ddf83b25.788987e5cc.wbe@email11.secureserver.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg00518.txt.bz2 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. 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. Regards -- Eliot Moss -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple