#41 2009-08-09 19:17

narayan
Senior Member
Registered: 2009-02-08
Posts: 470

Re: New Swap or Rearrange rule

I tried to insert a \ in the new name. As expected, ReNamer created a new folder, but it could not rename the file. I think the reason is that the original file is locked by ReNamer itself.

Conclusion: Inserting a \ can create a folder, but cannot move the file indirectly by renaming it.

Is that correct?

Offline

#42 2009-08-09 19:19

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: New Swap or Rearrange rule

narayan wrote:

[...]
********
BTW Stefan, could you do the wild card string also (example-5)?

I was able to solve Example #5 with this new rule.

BTW, I have modified this example post and updated to Denis new syntax: =>
http://www.den4b.com/forum/viewtopic.php?pid=3492#p3492


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#43 2009-08-09 23:21

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,378

Re: New Swap or Rearrange rule

Stefan wrote:

I found this Access violation in an rare case...

I fixed that. The problem was caused by an empty delimiter. WidePosEx function failed when an empty SubStr parameter is passed to it.

narayan wrote:

1. Use only the first instance of delimiter (or all instances)
2. Treat multiple consecutive delimiters as one.

I understand that there may be a need for these options, but we cant implement every possible option.

narayan wrote:

The rule is easy to use when the original file name is chopped in 2-3 pieces. For example, when a hyphen or bracket is used as delimiter. But when more tokens are created, precise manipulation becomes difficult. The reason is, we have no idea what is the value of the nth token.

I am certain that novice users who will benefit from this rule will almost always use only 2-3 pieces. Even if we take Stefan's 15 examples taken from real requests: 14 out of them used only 2-3 pieces.

narayan wrote:

Conclusion: Inserting a \ can create a folder, but cannot move the file indirectly by renaming it. Is that correct?

That is incorrect. Files do not get locked by ReNamer. In your case they should have been moved to a new folder. Can you describe your operation in more details?


Summary: I think this rule should be kept as simple as possible. Of course, it is always hard to find a balance between a number of options and simplicity. But remember that we are talking about really novice users, who have never heard of regular expressions and are struggling to use any software at all. Having this rule as it is already will be a big plus for them. For us, on the other hand, there is always PascalScript and RegEx to do more complex operations, with almost limitless number of options. And we can always more later if it will be necessary.

Putting the above aside, are we happy with how the rule works? Are there any other concerns?

Online

#44 2009-08-10 03:13

narayan
Senior Member
Registered: 2009-02-08
Posts: 470

Re: New Swap or Rearrange rule

@creating folders and moving files to them:
I got consistent problem with yesterdays' sample, but now I don't. So we will treat that as closed.

@preview:
Yes, I agree that most of the use cases will involve 2-3 pieces of the original name; and they won't need the preview.

Summary:
The rule works beautifully.

I admire the way you apply occam's razor rather than trying to fulfill the rare uses.
http://en.wikipedia.org/wiki/Occam%27s_razor

Offline

#45 2009-08-10 21:23

krtek
Senior Member
From: Łódź (Poland)
Registered: 2008-02-21
Posts: 262

Re: New Swap or Rearrange rule

I guess that will be a great rule.
The only thing I would like it to have would be the option to use only the first occurence of the delimiter.
Now it is not always clear what we will get if there is more than one delimiter in the filename, eg.:

I. Author - Book title - True story.pdf
I. Author - Book title.pdf

to:
Book title - True story (I. Author).pdf
Book title (I. Author).pdf

Now there is no possible way to do it right.

Same thing with Stefan's wish (a very good one) to have a possibility to strip only the last part of filename:
"title.text1.text2.text3.extension" to "title.text1.text2.extension"
The right-to-left is great and almost what we need but it fails because of splitting the filename by all dots and not just the first one.

Could you think about adding that option to the rule, Denis?
It would be more reliable when you could have to guarantee how many capturing groups there will be.
So "." with the "only first occurence" would mean that there will be two and only two groups $1 and $2.


Regular Expressions are not as hard to understand as you may think. Check ReNamer's manual or nice Regular Expressions tutorial for more info and start to use full power of applications that use them (like ReNamer, Mp3Tag and so on).

Offline

#46 2009-08-10 22:02

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

Re: New Swap or Rearrange rule

Come on guys let Denis some free time left.
Even the silliest novice user should be able to use two rules in conjunction, at least with our advice, isn't it?


> "title.text1.text2.text3.extension" to "title.text1.text2.extension"
1.) Replace Last "."  with  "#", Skip Extension
2.) Rearrange Split by "#", New Pattern "$1", Skip Extension


>I. Author - Book title - True story.pdf to Book title - True story (I. Author).pdf
>I. Author - Book title.pdf                  to Book title (I. Author).pdf
1.) Replace First " - "  with  "#", Skip Extension
2.) Rearrange Split by "#", New Pattern "$2 ($1)", Skip Extension


Maybe he want to improve this rule in the future if we really need something?
Till then let us use the pure power of ReNamer first big_smile
I have to apologize that i was an part of the mop who cry for more and more lol but hey, it was only brainstorming... wink

What do you think?


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#47 2009-08-11 03:00

narayan
Senior Member
Registered: 2009-02-08
Posts: 470

Re: New Swap or Rearrange rule

Denis, a small niggle: The hint could have a second line: "Add text and meta tags as required" tip.

Offline

#48 2009-08-11 09:00

krtek
Senior Member
From: Łódź (Poland)
Registered: 2008-02-21
Posts: 262

Re: New Swap or Rearrange rule

Stefan wrote:

Even the silliest novice user should be able to use two rules in conjunction, at least with our advice, isn't it?

To be honest it wasn't about using one or two rules. It was about vulnerability of the rule.
The problem now is that you can loose a part of the filename without knowing about it. And if you process few hundreds of files it will be really hard to spot it happened.

The best ilustration was the one with books title. If the delimiter that distinguish author from title will be repeated in book title, you will loose the part after that repeated delimiter without knowing about it.
I. Author - Book title - True story.pdf
New Pattern "$2 ($1)"
Let say you've got 500 of books, most of them is of type I.Author - Book title.pdf. You don't even have to know that there is one with " - " in the title.
You apply your rule and what you got is "Book title (I. Author).pdf". And that's because "True story" is now $3 and as it is not used in the new pattern it is lost.

I even start to think that my version should be the default one, and the option for multisearch of delimiters should be provided.
The thing is that in creating new pattern you are manipulating with few pieces that were created by applying delimiters and to make it straightforward and reliable you should know how many pieces there is.

Now delimiters are checked with OR, so there is no order of them.
I think that you should be able to specify that you want a " - " as first delimiter and "_" as the second one.


Regular Expressions are not as hard to understand as you may think. Check ReNamer's manual or nice Regular Expressions tutorial for more info and start to use full power of applications that use them (like ReNamer, Mp3Tag and so on).

Offline

#49 2009-08-11 21:00

eR@SeR
Senior Member
From: Земун, Србија
Registered: 2008-01-23
Posts: 353

Re: New Swap or Rearrange rule

I've found free time smile

narayan wrote:

The hint should mention "add literal text as needed", because this is hidden feature, and the rule's name ("reorder") does not imply this capability.

I agree. That hint could be really good to know for novice users...

narayan wrote:

A lot of trial and error attempts are needed before we get the right result.

While I was testing it everything was ok for now. Let time shows whether we did ideal rule.

den4b wrote:

Are we sure we need "Case sensitive" option for delimiters?

Yes. It will be easier to delimit consecutive characters.

Stefan wrote:

Not what we want but still good enough IMHO.

After all, good balance between simplicity and benefit.

den4b wrote:

Putting the above aside, are we happy with how the rule works? Are there any other concerns?

I will let you know if I spot something, off course wink

krtek wrote:

The only thing I would like it to have would be the option to use only the first occurence of the delimiter.

Another good notice. I hope that this will be included somehow hmm

P.S. Little bit off topic... Separator for multiple items in Remove/Replace rule is *|*. Make it to be as in Rearrange rule | to be unique.


TRUTH, FREEDOM, JUSTICE and FATHERLAND are the highest morale values which human is born, lives and dies for!

Offline

#50 2009-08-12 03:18

narayan
Senior Member
Registered: 2009-02-08
Posts: 470

Re: New Swap or Rearrange rule

I found that Rearrange has an unusual application:

We can use the whole name to compose the new name.
(We can use Insert rule also, but if we are using prefix and suffix both, we need to use Insert rule twice. Besides, the Rearrange rule shows us the new name's template, which is more comfortable.

I discovered a trick to use the whole name (select 1st position, and then use $2).
But this is not intuitive for novice users.

So an idea: Can we have $0 to represent the whole name?

Offline

Board footer

Powered by FluxBB