Page 1 of 1
Parameter for case sensitivity in rename
Posted: 10 Oct 2008 21:08
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) :
would mean that only "text" will be renamed.
would mean that "text", "Text", TExt" etc will be renamed.
Thank you in advance!

Re: Parameter for case sensitivity in rename
Posted: 10 Oct 2008 21:53
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?
Re: Parameter for case sensitivity in rename
Posted: 10 Oct 2008 22:01
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.
Re: Parameter for case sensitivity in rename
Posted: 10 Oct 2008 22:41
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)
Re: Parameter for case sensitivity in rename
Posted: 10 Oct 2008 23:11
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

Re: Parameter for case sensitivity in rename
Posted: 11 Oct 2008 00:25
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

hmm you're right, seems to be missing from the help file, I hadn't actually checked

, 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

)
Re: Parameter for case sensitivity in rename
Posted: 11 Oct 2008 02:49
by TheQwerty
jacky wrote:hmm you're right, seems to be missing from the help file, I hadn't actually checked

, 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.
Re: Parameter for case sensitivity in rename
Posted: 11 Oct 2008 03:03
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...
Re: Parameter for case sensitivity in rename
Posted: 11 Oct 2008 03:05
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

Re: Parameter for case sensitivity in rename
Posted: 11 Oct 2008 03:55
by TheQwerty
Ah.. indeed it's mentioned under RegExp but missing under the Search and Replace. Oops!

Re: Parameter for case sensitivity in rename
Posted: 11 Oct 2008 17:06
by admin
TheQwerty wrote:Ah.. indeed it's mentioned under RegExp but missing under the Search and Replace. Oops!

Just added it. Will be there for you in 7.70.
Thanks all!