Multi Commander > Support and Feedback

File Search Tab: Rename, Multi-Rename

<< < (3/3)

Crash+Burn:
Although it seems my original supposition above may be incorrect, I can't seem to match the "dot" of a file extension from a regular tab now either. It appears that MC's implementation doesn't have an option that allows for matching the whole filename as a single string - which you would think [Replace Name & Extension] would be.

I honestly don't know what you would use [Replace Name & Extension] for in its current form

given the following file:
everything.exe
Find: e
Replace: b
--> bvbrything.bxb

I would of expected [Replace Name & Extension] to allow access to the whole filename as a single string
thus permitting you to do something like:
everything.exe
Find: thing\.exe$
Replace: one.exe.bak
---> everyone.exe.bak

Now since you have to choose the matching type, of either [Name], [Extension] or [Name & Extension]
and since that choice affects all the Find/Replace fields, it's actually impossible to change filenames AND the extension.
Unless you want to match the same string in both the filename and it's extension... which seems unlikely.

GrantSP:
I have come to realize that the "problem" here lies with the users. (Crash+Burn and me) :(

As it has been said MC uses Perl compatible regex I decided to refresh my understanding of that interpretation.

Where I am expecting the backslash to "escape" the next character from the action performed upon the search items, what it actual does is serve as a metacharacter along with other characters to perform specific actions. Thus the error message I quoted earlier is in fact 100% correct and should have told me my use of "\" was wrong.

So I fall back on my previous comment that a lot of problems may be averted in the future with the addition of some kind of "legend of expressions" that are used in MC.
In the same manner as the "flyout" menu associated with the Multi-Rename tool when the "<" icon is selected.

More examples of user expectations not matching actual experience. :)

Mathias (Author):

--- Quote from: Crash+Burn on October 19, 2013, 02:06:24 ---Although it seems my original supposition above may be incorrect, I can't seem to match the "dot" of a file extension from a regular tab now either. It appears that MC's implementation doesn't have an option that allows for matching the whole filename as a single string - which you would think [Replace Name & Extension] would be.

I honestly don't know what you would use [Replace Name & Extension] for in its current form

given the following file:
everything.exe
Find: e
Replace: b
--> bvbrything.bxb

I would of expected [Replace Name & Extension] to allow access to the whole filename as a single string
thus permitting you to do something like:
everything.exe
Find: thing\.exe$
Replace: one.exe.bak
---> everyone.exe.bak

Now since you have to choose the matching type, of either [Name], [Extension] or [Name & Extension]
and since that choice affects all the Find/Replace fields, it's actually impossible to change filenames AND the extension.
Unless you want to match the same string in both the filename and it's extension... which seems unlikely.

--- End quote ---

Maybe the [Name and extension] settings should join the filename before doing the rename.
Right now there is code to do rename of name part and code that does rename of extension part. So when the N&E options was select both rename part was run.
I will look into if they the N&E option should join the name or if there should be another option.. but I think it would be safe to join them without breaking anything else.

Mathias (Author):

--- Quote from: GrantSP on October 19, 2013, 02:23:20 ---I have come to realize that the "problem" here lies with the users. (Crash+Burn and me) :(

As it has been said MC uses Perl compatible regex I decided to refresh my understanding of that interpretation.

Where I am expecting the backslash to "escape" the next character from the action performed upon the search items, what it actual does is serve as a metacharacter along with other characters to perform specific actions. Thus the error message I quoted earlier is in fact 100% correct and should have told me my use of "\" was wrong.

So I fall back on my previous comment that a lot of problems may be averted in the future with the addition of some kind of "legend of expressions" that are used in MC.
In the same manner as the "flyout" menu associated with the Multi-Rename tool when the "<" icon is selected.

More examples of user expectations not matching actual experience. :)

--- End quote ---

Yes, Some sample of regexp's would probably be needed. Both as tooltip and to on the doc page.
The thing is that I only have very basic knowledge of regexp and looking at it, looks like weeks of learning it. and I don't have the time.. but I will see if I can create some easy samples..

Crash+Burn:
This was one of the best documents I had read (10+ years ago), when I knew nearly nothing on regex  beyond the bare basics. It covers most of the options apart from more advanced syntax. HTML, .txt extension added to permit attachment. It used to be distributed with XNews.

--- Quote ---AUTHOR
       Philip Hazel, EMAIL <IN DOCUMENT, likely not active>
       University Computing Service,
       New Museums Site,
       Cambridge CB2 3QG, England.
       Phone: <IN DOCUMENT, likely not active>

       Copyright (c) 1998 University of Cambridge.
 
--- End quote ---

You could probably pull some decent examples out of it, without much issue, or redistribute it and keep the author acknowledgement.

For anyone wanting a more thorough overview: regular-expression.info was very good. There's lots of books as well, but I've found most of what I needed I could figure out myself, or refer to the document below, or articles online.

Navigation

[0] Message Index

[*] Previous page

Go to full version