Parameter for case sensitivity in rename

Features wanted...
Post Reply
ivan
Posts: 577
Joined: 02 Apr 2008 12:52
Contact:

Parameter for case sensitivity in rename

Post by ivan »

It would be good if for "rename" scripting command a [matchcase] is introduced. It is already present for "replace" command and if your renaming is based on patterns then specifying case for each situation is very tedious.

Syntax for it:

Code: Select all

rename [mode (b|r|s|k|e)], pattern, [preview (p)], [itemlist], [matchcase]
Examples (of possible future use) :

Code: Select all

rename s, "text/TEXT", 1;
would mean that only "text" will be renamed.

Code: Select all

rename s, "text/TEXT", 0;
would mean that "text", "Text", TExt" etc will be renamed.

Thank you in advance! :)
Windows Vista Business SP1 32-bit, Logitech MX400 mouse, SetPoint 4.60.122
Image

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Parameter for case sensitivity in rename

Post by TheQwerty »

I don't understand this request.

All of the methods that care about case already have switches, so what's gained by adding another parameter other than confusion?

ivan
Posts: 577
Joined: 02 Apr 2008 12:52
Contact:

Re: Parameter for case sensitivity in rename

Post by ivan »

TheQwerty wrote:I don't understand this request.

All of the methods that care about case already have switches, so what's gained by adding another parameter other than confusion?
Rename method doesn't have a case switch. Considering a significant part of rename method deals with renaming strings depending on patterns then it would be valuable not to worry about the case of those patterns.
Windows Vista Business SP1 32-bit, Logitech MX400 mouse, SetPoint 4.60.122
Image

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: Parameter for case sensitivity in rename

Post by jacky »

TheQwerty wrote:All of the methods that care about case already have switches, so what's gained by adding another parameter other than confusion?
I think the "confusion" comes form the fact that ivan doesn't seem to think reading the Help or the wiki is worth his time, he'd rather ask others in the forums. Hell, he didn't even read the tips of the rename search/replace feature which states :
Examples:
before/now = replace all 'before' with 'now' (case-insensitive: a=A)
before/now\ = replace all 'before' with 'now' (case-sensitive)
Proud XYplorer Fanatic

ivan
Posts: 577
Joined: 02 Apr 2008 12:52
Contact:

Re: Parameter for case sensitivity in rename

Post by ivan »

jacky wrote:I think the "confusion" comes form the fact that ivan doesn't seem to think reading the Help or the wiki is worth his time, he'd rather ask others in the forums. Hell, he didn't even read the tips of the rename search/replace feature which
My apologies, it is absent from the Help file and the "case insensitive statement" is not present when I looked up rename scripting command in the Wiki. Believe me, now that I'm getting more into scripting I use those resources much more than I have done 6 months ago 8)
Windows Vista Business SP1 32-bit, Logitech MX400 mouse, SetPoint 4.60.122
Image

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: Parameter for case sensitivity in rename

Post by jacky »

ivan wrote:My apologies, it is absent from the Help file and the "case insensitive statement" is not present when I looked up rename scripting command in the Wiki. Believe me, now that I'm getting more into scripting I use those resources much more than I have done 6 months ago 8)
hmm you're right, seems to be missing from the help file, I hadn't actually checked :oops:, sorry. But it is on the tips within XY, and it is on the wiki actually. Not on the page about the command rename itself, because from there you have the syntax for that command only, and links to the different rename mode (Batch, RegExp, etc) for each of the supported patterns syntax then. And on the Search/Replace it is there (I just checked that one, too ;))
Proud XYplorer Fanatic

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Parameter for case sensitivity in rename

Post by TheQwerty »

jacky wrote:hmm you're right, seems to be missing from the help file, I hadn't actually checked :oops:, sorry. But it is on the tips within XY, and it is on the wiki actually. Not on the page about the command rename itself, because from there you have the syntax for that command only, and links to the different rename mode (Batch, RegExp, etc) for each of the supported patterns syntax then. And on the Search/Replace it is there (I just checked that one, too ;))
Actually, it is in the help, as well. It's the same situation, the Rename() command tells you only about the scripting command and then says "For the functionality of the different rename operations see also here." which links you to the File Menu -> Rename Special section which covers this.

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Re: Parameter for case sensitivity in rename

Post by jacky »

TheQwerty wrote:Actually, it is in the help, as well. It's the same situation, the Rename() command tells you only about the scripting command and then says "For the functionality of the different rename operations see also here." which links you to the File Menu -> Rename Special section which covers this.
Oh yeah, well that's maybe cause I'm still running 7.60.0047 and have an old version then, cause my help file does have a mention of this only for RegExp rename, but nothing under Search/Replace...
Proud XYplorer Fanatic

ivan
Posts: 577
Joined: 02 Apr 2008 12:52
Contact:

Re: Parameter for case sensitivity in rename

Post by ivan »

jacky wrote:Oh yeah, well that's maybe cause I'm still running 7.60.0047 and have an old version then, cause my help file does have a mention of this only for RegExp rename, but nothing under Search/Replace...
Running the latest version, nothing is shown under Search/Replace :wink:
Windows Vista Business SP1 32-bit, Logitech MX400 mouse, SetPoint 4.60.122
Image

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Parameter for case sensitivity in rename

Post by TheQwerty »

Ah.. indeed it's mentioned under RegExp but missing under the Search and Replace. Oops! :oops:

admin
Site Admin
Posts: 66305
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Parameter for case sensitivity in rename

Post by admin »

TheQwerty wrote:Ah.. indeed it's mentioned under RegExp but missing under the Search and Replace. Oops! :oops:
Just added it. Will be there for you in 7.70.

Thanks all!

Post Reply