I ripped my 11 disk "Adventures of Robin Hood" collection using MakeMkv.
There are 13 files in each folder (each folder is a disk) and I want to rename all 143 files to the episode names which I have in a text file.
Problem is, I can't come up with a batch file (or any of the renamer programs) which will use the text file list to rename the source file.
This shows what I'm trying to do: renaming the .mkv file to the episode name.
[Attachment 58727 - Click to enlarge]
+ Reply to Thread
Results 1 to 12 of 12
Last edited by sambat; 10th May 2021 at 14:00.
Been a looooooooong time since I dabbled with .bat files so maybe I over-simplify the 'solution'
Edit your text file to filename.bat then edit each line as:
rename [drive]:\[folder]\[oldfilename].mkv [newfilename].mkv
execute the .bat file
Mind you, in the time it took you to create that text file, you could have manually renamed the files direct in the folders
If you remove the title number and replace it with only the title name then they will display in alphabetical order and NOT in broadcast order.
So, I've left the title number on.
I am assuming you have 1 list in each folder.
Open your list(s) with a text editor - in the batch file I've called the list arh.txt.
Find/Replace the multiple spaces between the video name and the episode name with a #
Ending up with something like this:
Antiques Roadshow_S31E01.mkv#Bolton Abbey
Antiques Roadshow_S31E03.mkv#Chester 1
Antiques Roadshow_S31E05.mkv#Althorp and Ascot
Then save the following as a batch command (arh.cmd sounds nice )
for /f "tokens=1-4 delims=#._" %%a in (arh.txt) do echo ren "%%a_%%b.%%c" "ARH %%b_%%d.%%c" pause
Drop the batch file into each folder which already contains the episodes and the newly formatted title list.
Run it to test until your happy, BEFORE removing the echo.
Last edited by pcspeak; 5th May 2021 at 01:17.
Thanks to all.
There are 11x13=143 files, so that's not going to happen.
Python, that will be plan C.
I found out about the alphabetical re-arrangement when trying out the ren command.
I'll give your code a shot.
Ok. But just ask yourself how long it takes you to type out 143 revised titles.
Each solution requires that if I am not mistaken. Of course if you wanted to renames 00's of clips you might wish to seek out some 'elegant' method. But most can type 1 title in 15-20 secs. So 143 is not going to take very long and you have full control over the process.
Just my 2 cents.
Instead of using the bat file - courtesy of 'pcspeak' - I opted to make a template using notepad++.
After that all I had to do was paste the episode names in (thank's Wikipedia) and save it as a bat file.
I tried for a week to get the bat file working , but I couldn't fathom how it worked and trying to get examples 'on line' were to no avail mainly because the expanations weren't clear enough for me to grasp ('tokens' or 'delims' still a mystery), so to save my sanity, I gave up.
This is the most advanced renaming tool I found.
It's 100% free, too.
I used it a lot, it's incredibly powerful and with it you can rename a set of "ordered" files using an external text list in every possible way.. but you have to study the documentation and the examples a lot. Then it's simply amazing what it can do for you. You have only to press a button to rename hundreds of file, once you have a list of titles to give to them and a pattern for renaming them.
Thank-you , I shall check it out.
I use this ReNamer: https://www.den4b.com/products/renamer , Using portable version.
So far I did not come up with something that it cannot do. I recommended it before. It took me just couple of seconds to figure out and test what you want and it works, and it is insanely simple and intuitive and it shows you what you'd rename it to actually before executing actual renaming:
-Drop your files on GUI
-press "+Add" to add a rule and choose "User Input" on the left, then "Options" on the top right and select txt file. I had a file that was like this:
First file name
Second file name
Third file name
-Then press "Add Rule" button
-then add another rule: "Serialize", in there you format numbers at the beginning so files are lined up always subsequently , when done pres button "Add rule"
When satisfied (you can always remove rules and tried something else), just press "Rename" in main GUI
EDIT: I removed those extensions from that txt list and it also works, it keeps original extensions
Last edited by _Al_; 9th May 2021 at 13:30.
I tried it out and it works good.
I tried this one too and it worked as well.
After testing both, I think I prefer 'Renamer'.The unregistered version limits to five the number of 'Rules', but I could manage fine with three.