moving/renaming batch date Range?

If you need help on how to use the program
Post Reply
a5ian300zx
Posts: 8
Joined: 2011-11-23 09:38:04

moving/renaming batch date Range?

Post by a5ian300zx »

Hi All,

I need help renaming my movie collection at the moment it is name as below but i need the date range moved

at the moment its:

Predator [Ultimate Hunter Edition 1987 DTS-HD-MA 1080p CHD].mkv

to something like this:

Predator [1987 Ultimate Hunter Edition DTS-HD-MA 1080p CHD].mkv

or

Predator (1987) [Ultimate Hunter Edition DTS-HD-MA 1080p CHD].mkv

Most my movies are in the date range of 1970-2011

Thanks

a5ian300zx
antp
Site Admin
Posts: 9665
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Hi,
You could try using the following regular expression:
^(.+) \[(.+) ([0-9]{4}) (.+)\]\.(.+)$
with one of the two strings as new name:
$1 ($3) [$2 $4].$5
$1 [$3 $2 $4].$5
Depending on what special cases are in the file names it may not work with all, but it works with the sample you gave :D
a5ian300zx
Posts: 8
Joined: 2011-11-23 09:38:04

Post by a5ian300zx »

Hi,

Thanks for the prompt reply, I am newbie with this software so if you can please break it down a bit, I'm guessing i will need to do that on the string replacement field? "search for" and "replace by"

few more examples of my naming convention, just in case anythings needs amending.

Potter [Part1 1999 DTS 1080p -CHD].txt
Avatar [Extended 2010 DTS 1080p -CHD].txt
Star Wars [Directors 1977 DTS 1080p CHD].txt

Kind Regards
a5ian300zx
antp
Site Admin
Posts: 9665
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

It is in the "regular expression" action. It is very complicated when you do not know how these works (but here you just have to copy/paste :D), but it is the only solution for a case like yours I think. Regular expression is a standard things used in many programs, quite powerful once you know the syntax.
So in the action "regular expression" you have two fields: one for the expression, one for the new name format.
In the first one, you put the expression with lots of parentheses.
In the second one you put the file name masks, containing all the "$" signs. I gave two versions for that, as you gave two examples of the wanted result.
a5ian300zx
Posts: 8
Joined: 2011-11-23 09:38:04

Post by a5ian300zx »

thank you - Legend - works perfect on some test files,

now the issue is that all my movies file are is their own folders with the same naming convention within a some Main HD folders.

i.e

folder
HD
folder
Predator [1987 Ultimate Hunter Edition DTS-HD-MA 1080p CHD].mkv
file
Predator [1987 Ultimate Hunter Edition DTS-HD-MA 1080pCHD].mkv
folder
Avatar [2010 DTS-HD-MA 1080p CHD].mkv
file
Avatar [2010 DTS-HD-MA 1080p CHD].mkv
Avatar [2010 DTS-HD-MA 1080p CHD].sub

how do i get it to rename folders inc files within that folder with that command?

EDIT: i tested this but just moves the renames the files within the folders and not the folders themselves.

Kind Regards
a5ian300zx
a5ian300zx
Posts: 8
Joined: 2011-11-23 09:38:04

Post by a5ian300zx »

Hi,

just trying the above on some of my media collection which consists of .mkv .ts .m2ts .avi but does not seem to work?

Thanks
a5ian300zx
antp
Site Admin
Posts: 9665
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

to work on folders too, change the expression to

^(.+) \[(.+) ([0-9]{4}) (.+)\](.*)$

About your other question, you mean that on some files it does not work? Check the "Log" page in Ant Renamer to see why it didn't rename some files.
a5ian300zx
Posts: 8
Joined: 2011-11-23 09:38:04

Post by a5ian300zx »

Hi,

I have removed all the files from the folders now, so just have the file names but the strings you have given me work fine on a .txt files but when i try them of the actual movie files i.e. extensions .mkv .srt .ts .m2ts .avi .iso .sub they do not work

the log says

was not named - new name is the same as the old name

a5ian300zx
antp
Site Admin
Posts: 9665
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

You actually also have to remove the dot from the mask for new name, I missed that
i.e.:
$1 ($3) [$2 $4]$5
or
$1 [$3 $2 $4]$5
Though that this is not related to the problem
Can you make a screen capture of what is in the "Files" tab, i.e. the list of files ready to be renamed?
Or give a sample list of a few names, both names which work or not?
(there can't be only the extension which changes, as the extension is not relevant in this expression)
a5ian300zx
Posts: 8
Joined: 2011-11-23 09:38:04

Post by a5ian300zx »

Hi,

Thanks for the update.

I have used this one

^(.+) \[(.+) ([0-9]{4}) (.+)\]\.(.+)$

$1 ($3) [$2 $4].$5

this came back with putting all the dates in front of the brackets like below

Predator [1987 Ultimate Hunter Edition DTS-HD-MA 1080p CHD].mkv

and some in

Avatar (2009) [Extended Edition DTS-HD-MA 1080p CHD].mkv

but after seeing it i prefer it like the below


Avatar (2009) [Extended Edition DTS-HD-MA 1080p CHD].mkv

so I do i get to the above from the first one? I have attached a test naming file that you can try on with dummy names and file extensions.

File name: Test.zip File size: 1.28 KB

Thanks
a5ian300zx
antp
Site Admin
Posts: 9665
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

So you ask me to move the date from
xxxx [date xxxx]
to
xxxx (date) [xxxx]
?

Use the following:

^(.+) \[([0-9]{4}) (.+)\](.*)$

$1 ($2) [$3]$4
a5ian300zx
Posts: 8
Joined: 2011-11-23 09:38:04

Post by a5ian300zx »

Hi,

Thanks that works perfect, finally all the same name :)

PS: i will donate when i get home from work tonight.

Thanks once again for all your help.

a5ian300zx
Post Reply