Help with regexp


#1

This isn't exactly related to mp3tag, but I recalled this forum had some regexp experts, so I returned to see if I could get some assistance.

The scenario is this: movies I've ripped from BluRay over the years and then loaded onto my NAS have different naming conventions.

When I initially started ripping my collection, I chose title.year.bluray.720p.dts.x264.mkv. I later switched the source and resolution.

What regexp commands can I run to a) find the offending filenames, and b ) possibly change them for me? I can connect to the NAS with Putty and run commands via command line. Even if I only find them, that would be a big help. I can rename manually if necessary.

The files should be:

title.year.720p.bluray.dts.x264.mkv

NOT

title.year.bluray.720p.dts.x264.mkv

Much thanks if this can be done.


#2

I am not sure if this is a regular expression thing.
What I would do:
Create a text file that has all the filenames, perhaps in a Command Shell with
dir /s >my.txt
then I would load the text file into a word processor and replace all "." with ""
(in Word this is ^t).
Then create a table and sort it alphabetically.
All the filenames that match one or the other pattern should be grouped together.
Delete all entries for the correct names.

Now: copy all columns and insert them to right of the table.
(you now have twice the same sequence in the each line).
Select the column with the information that should get a new position in the filename and move it.
Convert the table back again to text and if you can set it use the dot as separator otherwise ue the tab-stop.
Then replace all tab-stops with a dot.
then replace mkv. with mkv
Then replace all paragraph-end characters (this is ^p in Word) with "^pren " (for "rename") and add a "ren " in the first line and delete one in the last.
Now save the whole file plain text and the extension .bat and run it in a Command Shell so that you start a renaming job.


#3

Sorry, I am talking complete bull here.

Add the mkv files to the files that Mp3tag reads. (Tools>Options>Tags>Restrict incoming files to)

Then set a filter to
%_filename% HAS "bluray.720p."

The use the converter Filename-Filename
Enter as Source Pattern
%1.%2.%3.%4.%5.%6

Enter as Target pattern:
%1.%2.%4.%3.%5.%6

The preview should help you.

-----snip-----<
On November, 13th 2013 this topic has been on display for more than 7 months without any response by the OP. Is there a reward for longest period without an answer?
And: there was no more recent off-topic ...