#51 2009-08-14 03:40

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

Re: New Swap or Rearrange rule

Logically, the Rearrange rule should be placed just after the Replace rule.

Offline

#52 2009-08-14 09:27

SafetyCar
Senior Member
Registered: 2008-04-28
Posts: 446
Website

Re: New Swap or Rearrange rule

(or at least before RegEx...)


If this software has helped you, consider getting your pro version. :)

Offline

#53 2009-08-15 22:27

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

Re: New Swap or Rearrange rule

EDIT: solved by krtek some posts below ( i had not think far enough as i wrote this  sad )





Beta 14. Aug

If i use $-2 or more the ext is dropped, if i use $-1 it's not.
Please see Example 18 => http://www.den4b.com/forum/viewtopic.php?pid=3492#p3492

This can be prevented by using [X]Skip Extension, but...

Last edited by Stefan (2009-08-15 23:53)


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

#54 2009-08-15 22:46

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

Re: New Swap or Rearrange rule

Denis, just an note from an test:

den4b wrote:

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.

  • .

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

  • .

  • .


Questions:

  • ?

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

I can use $ in new order to insert an $-sign in the new file name, good.
But i can't insert $8 f.ex.  because this is interpreted as an part No. 8.
It may be an very rare case someone needs this,
but maybe you want to add $$-rule to allow to insert somethig like $8 ?

On the other side we could use an very simple trick and insert something like $,8 instead
and add an second rule to remove the coma again.

Just to considering it while in beta state.


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

#55 2009-08-15 23:15

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

Re: New Swap or Rearrange rule

Stefan wrote:

If i use $-2 or more the ext is dropped, if i use $-1 it's not.

It's completely like it should be.
Your delimiter is " ". And you use "Right-to-left".

So:
For title text1 text2 text3.ext
$1: text3.ext
$2: text2
$3: text1
$4: title

If you will add a dot as a delimiter, so " |." (space and dot) you'll get:
For title text1 text2 text3.ext
$1: ext
$2: text3
$3: text2
$4: text1
$5: title

It's still not what I would like from the rule. roll
Multiple search and replace is good when we know that every piece that matches criteria will be replaced with something.
That's what's going on in RegEx rule. RegEx is matched multiple times but it makes replace as many times as it was matched.
Rearrange searches as multiple, but replaces in one shot. As I said earlier, that's unstable for me.
I'm for ordered once-searched delimiters as default, and multiple search for delimiters as an option.
So one would need to input: " - | - | - |_|."
For: "Artist - Title - Year_192kbps.ext".
There is still the problem of repeated delimiter, it might produce unexpected data, but nothing is lost. So (even after a month, depends on when you'll spot it) you can do a little debug and find out what happened.

Last edited by krtek (2009-08-15 23:17)


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

#56 2009-08-15 23:48

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

Re: New Swap or Rearrange rule

krtek wrote:
Stefan wrote:

If i use $-2 or more the ext is dropped, if i use $-1 it's not.

It's completely like it should be.
Your delimiter is " ". And you use "Right-to-left".

So:
For title text1 text2 text3.ext
$1: text3.ext
$2: text2
[...]

Unbelievable roll  your're right of course neutral  thanks smile


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

#57 2009-08-20 03:26

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

Re: New Swap or Rearrange rule

Can we have tokens for the path? That will allow people to extract parts of the path and use them to compose the new file name.

Each segment of the path should be a separate token.

Just like how we use $ for the delimited file name parts, we can have another symbol for these tokens also.

Say  "<"  (I chose it because it shows what is on the left side of the filename. smile  )

For example, for the file-
C:\Program Files\Java\jre6\bin\javacpl.cpl

We have-
<1 = C:
<2 = Program Files
<3 = Java
<4 = jre6
<5 = bin

Just like the $-n numbering, we can also use the right-to-left numbering here also (<-1 = bin)

**********

Or else have both < and > in play:

< counts from right-to-left.
> counts from left-to-right.

(This is much more intuitive and also eliminates the need for using negative numbers.)

Last edited by narayan (2009-08-20 04:04)

Offline

#58 2009-08-20 08:01

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

Re: New Swap or Rearrange rule

narayan wrote:

Can we have tokens for the path?

Suggested >here< as  meta tag :File_Path: (insert full path but replace "\" by "#-#" or smtg)  analog to :File_FolderName:

but no interest from Denis right now. Maybe when long winter nights comes ...  big_smile


And... why establish new tokens?
<1 = C:
<2 = Program Files


Just split at  #-#
(if an file would contain #-# itself the user has to exchange this first)



I think this is more the DWODT roll  (Denis-way-of-doing-things)


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

#59 2009-08-20 14:28

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

Re: New Swap or Rearrange rule

So that makes two of us in favor of paths as tokens. Anyone else for it? smile

BTW I think your method is convoluted for the class of users we are addressing (newbies).

We have to first use a meta tag, then replace \ with something else and then use it as delimiter, and finally compose the new name with the parts. And if the base name also happens to have that same character, we will have an additional problem to solve.
We also have to use another delimiter/position method to chop the base name too; and then finally assemble the whole thing.

On the other hand, the tokens method I suggested is very easy for a newbie to use.

Mostly we will need the immediate parent (or the "grandparent") folder. That is typically useful for renaming mp3s that are stored in the folders named after the album and then artist. So rather than the path segments towards the drive letter, the lower segments would be used more.

Last edited by narayan (2009-08-20 14:32)

Offline

#60 2009-08-20 14:44

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

Re: New Swap or Rearrange rule

narayan wrote:

We have to first use a meta tag,
then replace \ with something else
and then use it as delimiter,
and finally compose the new name with the parts.

Sorry, just a note to make it clear: the \-replacement will/should be done from the :File_Path: meta tag algorithm.

What would be the best replacement sign for an "\" ?
* user chosen
* underscore _
* special char like #
* special sign combination like #-#  or  empty [} or {) or (!)


Oh, and BTW... (i know that we want this inside ReNamer itself, but to not stress Denis that much...) >PascalScript to split folders< smile


EDIT:
BTW, :File_FilePath:  is >added< since >beta 20. Aug. 2009<

Last edited by Stefan (2009-08-20 19:19)


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