#31 2009-08-09 03:07

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

Re: New Swap or Rearrange rule

Then this is going to be just fantastic!!

The only things dropped are live preview and case conversion, which is fine.

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.

Since you are using "$" to identify the tokens, I assume literal numerical characters would not be required to be entered with a "\"? Otherwise that too should be mentioned in the hint.

Does the rule allow building of string delimiter with wild cards? (See Stefan's example#5)

@name:

Compared to "swap", "reorder" is definitely better, because it implies a thorough reshuffling of tokens. But still it does not convey the idea of adding literal strings and meta tags. When these are added, the new name changes drastically. This is not conveyed in the rule's name.

On the other hand, "Free Form" does not convey that this rule reuses tokens from the original name.

I could not think of a single word that conveys both actions.

How about "Rearrange" as compared to "reorder"? May be more recognizable for the users who are not conversant with English. And it does have a faint hint of additional items, compared to "reorder".

Offline

#32 2009-08-09 06:57

prologician
Member
Registered: 2009-01-30
Posts: 84

Re: New Swap or Rearrange rule

The only thing I can think of is that $s are legal in filenames... it could get interesting if someone were trying to rename something to "Case $1 - $2 (Cost $5000)" (a lame courtroom-like example, where the person was putting expenditures into the filename). Not that this is a BIG point, it could be handled by an Insert or something (or an alternative, use $ as an "escape character", so $$ in the "New Pattern/Order" box produces a single $ in the output filename?)

One other case is that $s pop up in the Java compiled files.... particularly if you have private inner classes. These then take on a form like Outerclass$Innerclass.class.... I figure that in this case, the code will be smart enough not to explode when it sees a $ but no number following it?

In any case, the screenie looks bewdiful~ *^_^* Wonderful work as always (and it's not even done yet!)

Offline

#33 2009-08-09 10:16

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

Re: New Swap or Rearrange rule

den4b wrote:

Delimiters need a separator because delimiters can be whole strings, not just individual characters,

What do you guys think? Any final alterations?

> delimiters can be whole strings
Can we have "[ ] Match searched Case only" and "[ ] Match Whole Word only" too without making a lot of work to you?
I want be sure only that we match exactly what we search for.
Is this to much for your taste forget it please.


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

#34 2009-08-09 10:19

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

Re: New Swap or Rearrange rule

prologician wrote:

The only thing I can think of is that $s are legal in filenames...
[...]
, use $ as an "escape character",
so $$ in the "New Pattern/Order" box produces a single $ in the output filename?)

Good Point.


What is if f.ex. $1-part contain an $-char itself?
I am sure there will be no problem for the code as it paste only the content of $1-var,
but this should be checked in test scenario.

Last edited by Stefan (2009-08-09 10:22)


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

#35 2009-08-09 10:26

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

Re: New Swap or Rearrange rule

Denis, do you use Trim($part)?


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

#36 2009-08-09 10:51

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

Re: New Swap or Rearrange rule

Just idea, i know it's to much, but i don't want be late, so i just mention it, perhaps you can use it:

Can we have $LastPart ?
$L := UBound(parts)

And $AllParts(scope,separator)?


From:
"title.text1.text2.extension"
"title.text1.text2.text3.extension"
To:
"title.text1.extension"
"title.text1.text2.extension"

Delimiter: .
New Order: $A(-1,".")   ----- all but last part, no matter how many parts a name may have.



Or
Part $2 till $7 dash $LastPart $1:
$A(2-7," ") - $L $1


Maybe second last
$L(-1)


No push, just brainstorming:)


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

#37 2009-08-09 16:54

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

Re: New Swap or Rearrange rule

This new rule is now called "Rearrange", as it is more appropriate.

Answers:

  • $ is a legal character in the filename, and it will remain intact. The rule replaces them with 0x01 system character before processing the file, and replaces them back when finished.

  • Parts are not trimmed (Trim($part) does not occur).

  • Unused $N in the new pattern are removed (replaced with an empty string).

  • I don't think we need something like $L(-1) or $A(2-7," ").

  • I don't think we need "Match Whole Word only", they are delimiters after all.

Remember, this is a simple rule, for something more complex people can use PascalScript or RegEx.

Questions:

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

  • Do we really need to have an escaped $$ to use $ in the new pattern?

You can try it out in the latest dev version: ReNamerBeta.zip

Offline

#38 2009-08-09 18:11

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

Re: New Swap or Rearrange rule

1.)
I was able to use this new rule for most of the examples here (updated) http://www.den4b.com/forum/viewtopic.php?pid=3492#p3492


#######################

2.)
I found this Access violation  in an rare case:



Example 15:
From:
"Case $1 - $2 (Cost $5000)"
To:
"Cost $5000 Case $1 - $2"

Delimiter:  "(|"    <------ wrong use
Skip Extension [ ]
New Order:  $2 $1

AND pasting  "Case $1 - $2 (Cost $5000)" into Analyzer  i get:

---------------------------
ReNamer
---------------------------
Access violation at address 005C7062 in module 'ReNamer.exe'. Read of address 00000000.
---------------------------
OK   
---------------------------


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

#39 2009-08-09 18:50

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

Re: New Swap or Rearrange rule

I tinkered with the rule, and I feel two more options may be required when a character is used as delimiter:

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

********
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 chopped some trial file names with "space" as delimiter (so each word in the name becomes a separate token). But rearranging them is indeed not easy. A lot of trial and error attempts are needed before we get the right result.

I think Stefan was spot on when he showed in his screenshot what each token looks like, using the first listed file as sample. Then the user can easily compose the final name.

Having a sample preview of the new name would help even further, as all errors can be corrected on the spot.

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

Last edited by narayan (2009-08-09 18:57)

Offline

#40 2009-08-09 19:16

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

Re: New Swap or Rearrange rule

narayan wrote:

[...] But rearranging them is indeed not easy.
A lot of trial and error attempts are needed before we get the right result.

Note that you can have the Analyzer dialog open all the time.
You can even paste a few examples into them to see what happens.
There is no need to close Analyzer window, it is Non-modal  (http://en.wikipedia.org/wiki/Dialog_box)
So you can still edit the rule with Analyzer open.
Not what we want but still good enough IMHO.


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

Board footer

Powered by FluxBB