Remove from x to extension

Advanced Renamer forum
#1 : 10/07-12 21:06
Sandy Smith
Sandy Smith
Posts: 3
Hi everyone.

I'm jusr trying out this renamer and am a bit bewildered by all the options, so hope someone can help with what I expect to be a very simple job.

I have a large quantity of AVI files with "nearly" standardized names in this format;

<Series Name>.<Episode Number>.<Other stuff>.AVI

For example,

MURDOCH MYSTERIES.101.POWER.AVI
MURDOCH MYSTERIES.102.THE.GLASS.CEILING.AVI

I want to remove everything from 101. to the extension and 102. to the extension and be left with

MURDOCH MYSTERIES.101.AVI
MURDOCH MYSTERIES.102.AVI

The method isn't, I'm afraid, immediately obvious.

I do hope someone can solve this????

Sandy.


10/07-12 21:06
#2 : 10/07-12 23:46
Kim Jensen
Kim Jensen
Administrator
Posts: 771
Reply to #1:
Try to add the Replace method and use this configuration:
Text to be replaced: (.*?)\.(.*?)\..*
Replace with: \1.\2
Case sensitive: OFF
Use regular expressions: ON
Apply to: Name

This solution is a bit advanced. That is because your problem is a bit complex. The thing that makes it complex is that you want to remove a part from the file name with a dynamic length and without a clear separator.

What this configuration does is to pattern match your filename into the three parts you describe, and replace the while thing with only the first two parts. The . are very important. If you change this separator this configuration will not work. 2 . are needed for this to work.

I hope this works for you.


10/07-12 23:46
#3 : 11/07-12 09:33
Sandy Smith
Sandy Smith
Posts: 3
Hi Kim,
many thanks for the quick response. I'll try that out tonight, when I get home from work.

As you say, a pretty advanced solution and I doubt I would have got to that without your assistance.

I was hoping there would be a simple "count" method, i.e. "Remove everything from x to the end" or "Remove everything from x to the start".

"x" is always the same for a given set of files.

In my case of;

MURDOCH MYSTERIES.101.POWER.AVI

I was hoping for something along the lines of REMOVE PATTERN (RStr x:*). In my case (RStr 21:*), leaving MURDOCH MYSTERIES.101.AVI and so on.

I was looking through the various String options for something like that.

I'll let the forum know how your solution works, later.

Thanks again,
Sandy.


11/07-12 09:33
#4 : 11/07-12 12:38
Kim Jensen
Kim Jensen
Administrator
Posts: 771
Reply to #3:
If you want to keep the first 21 characters and remove the rest you can do something more simple with the Remove method. Add it and configure it like this:

Remove: 1000
Starting at: 22
Backwards: OFF
Case sensitive: OFF
Apply to: Name

I also think you can use the New Name method and configure it like this:
New name: <Word:1> <Word:2>.<Word:3>
Apply to: Name

There are many ways to achive the same thing.


11/07-12 12:38
#5 : 12/07-12 13:12
Sandy Smith
Sandy Smith
Posts: 3
HI Kim,
I'm now a happy chappie.

Both methods worked out OK.

Thanks for all the help,

Sandy.


12/07-12 13:12