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: Has rename syntax changed?
Date: Fri, 28 Feb 2020 19:52:00 -0000	[thread overview]
Message-ID: <31e0514d-49e9-9aea-fccf-7cc1524c6510@SystematicSw.ab.ca> (raw)
In-Reply-To: <CAD8GWsvpmfoNtmyN=ntqMF7k3bTy6ycp2EnxZ3ZGe5uz4LrtXw@mail.gmail.com>

On 2020-02-28 11:09, Lee wrote:
> On 2/28/20, Fergus Daly wrote:
>> I am almost certain that the command
>> $ rename "anything" "AnyThing" *.ext
>> would alter the string from lc to uc as shown, anywhere it occurred in any
>> filename in *.ext in the current directory.
>> What I remember as past behaviour now fails, leaving he filename unaltered.
>> (Failure in much the same way as mv would fail if the similar attempt was
>> made.)
>> (Good old DOS command rename (or the abbreviation ren) used to achieve
>> multiple-rename in an easy manner that just eludes bash.)
>> Anyway: has something altered (and quite recently, i think), or am I just
>> mis-remembering the versatility of the command rename?
> 
> Try it with the '-v' option
> 
> $ rename -v anything AnyThing *.ext
> `anything.ext' -> `AnyThing.ext'
> `xxanythingxx.ext' -> `xxAnyThingxx.ext'
> 
> $ rename -v AnyThing anything *.exe
> rename: *.exe: not accessible: No such file or directory
> 
> $ rename -v AnyThing anything *.ext
> `AnyThing.ext' -> `anything.ext'
> `xxAnyThingxx.ext' -> `xxanythingxx.ext'

This will always depend on the file system interface: DOS ignores case changes
as case is not supported, ExFAT/VFAT and everything else preserves case changes,
as do most remote file systems, unless the remote is set up case insensitively
to check the old and new names and ignore case changes (I've been annoyed by
that in the past, normally on proprietary file servers).

-- 
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.

--
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

  reply	other threads:[~2020-02-28 19:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28 12:38 Fergus Daly
2020-02-28 18:09 ` Lee
2020-02-28 19:52   ` Brian Inglis [this message]
2020-02-29  8:27   ` Fergus Daly
2020-02-29 15:48     ` Brian Inglis
2020-03-04  3:52 ` L A Walsh
2020-03-04  5:09   ` Hans-Bernhard Bröker
2020-03-04 10:42     ` L A Walsh
2020-03-05 10:33       ` Hans-Bernhard Bröker

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=31e0514d-49e9-9aea-fccf-7cc1524c6510@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).