X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=vilXO/cKkW0hitpr /tjxYiPyNg3/rNA6QnfxGZb3ZN2FpAK3Vw0KW5f0pfx+sMq1Ua0/U6BGzr7DH1x3 MboLagCELAQ1NhcTWg6DUj5aIouV+/qmeQz0LzFqB+89M+HeMlRH7yxNhMBiZS/U WLOa190gkRXcHsYArN8XkSJ8wSA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=5eztzRSLD2oNTAPB5kxwEJ QWNUc=; b=BeQ6sXIrPHsgIgO2atg83HOsK6YUET0ZE8+6GyUfnhsTLI6p1dARHa N1SBqN/BAbJp8s1WL5Mp/4UaqUq7iKGRSNeIeK2WtSKu0yIAuMS3yRYNWUyM3ogu ubSyuCSBQBpR0c8t+aK55nkA8Hbq1mD6wyFE29zeEBrfLUuCIuY7s= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy=H*f:sk:AM6PR03, H*f:sk:CAD8GWs, H*f:sk:ntqMF7k, H*i:sk:CAD8GWs X-HELO: smtp-out-no.shaw.ca Reply-To: cygwin AT cygwin DOT com Subject: Re: Has rename syntax changed? To: cygwin AT cygwin DOT com References: From: Brian Inglis Message-ID: <31e0514d-49e9-9aea-fccf-7cc1524c6510@SystematicSw.ab.ca> Date: Fri, 28 Feb 2020 12:52:35 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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