public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin@cygwin.com
Subject: Re: Latest versions of cygwin - Paths with spaces
Date: Tue, 17 May 2022 23:49:25 -0600	[thread overview]
Message-ID: <bd02dc0a-4474-c61f-42bc-19e7314300a3@SystematicSw.ab.ca> (raw)
In-Reply-To: <DM5PR14MB1212EFE636111B161861CF5293D19@DM5PR14MB1212.namprd14.prod.outlook.com>


On 2022-05-17 21:28, André Bleau wrote:
> Giovani Erthal wrote:
>> I'm using rsync to perform backups. But I have errors in paths with spaces.
>> Source: C:\Users\giova\Downloads\Teste com espaço
>> Destination: C:\Users\giova\Downloads\Destino com espaço
>> Command:
>> rsync.exe -avz -s --no-perms --no-owner --no-group --chmod=ugo=rw
/cygdrive/C/Users/giova/Downloads/Teste"
>> "com" "Espaço /cygdrive/C/Users/giova/Downloads/Destino" "com" 
>> "espaço

> Wrong space quoting. Try:
> rsync.exe -avz -s --no-perms --no-owner --no-group --chmod=ugo=rw "/cygdrive/C/Users/giova/Downloads/Teste com Espaço" "/cygdrive/C/Users/giova/Downloads/Destino com espaço"

>> Result:
>> sending incremental file list
>> rsync: link_stat "/cygdrive/C/Users/giova/Downloads/Teste" "com" "Espaço" failed: No such file or directory (2)
>> sent 18 bytes  received 12 bytes  60.00 bytes/sec
>> total size is 0  speedup is 0.00
>> rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1178) [sender=3.1.2]
>> Initially I was using cwrsync 6.2.4 (it has the same problem). Using cwrsync 5.5.0 everything works perfectly.
>> Now I downloaded cygwin and installed rsync (latest version), but the problem is the same.
>> How to make this work without using an old version of cygwin?

What shell are you using and what OS is handling command processing?
For CMD and Windows, you must to double quote the whole path.
For bash and Cygwin, you may use any of the accepted methods: \ , " ",
' ', although it is much more normal, if quoting, to quote the complete 
path, or only backslash quote the spaces and other special characters.
Drive case should make no difference as long as case is ignored on lookup.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

  parent reply	other threads:[~2022-05-18  5:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-18  0:00 Giovani Erthal
2022-05-18  3:28 ` André Bleau
2022-05-18  4:04   ` Gary Johnson
2022-05-18  5:49   ` Brian Inglis [this message]
2022-05-18 13:24 ` Giovani Erthal
2022-05-18 15:38   ` Thomas Wolff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bd02dc0a-4474-c61f-42bc-19e7314300a3@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).