topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday April 16, 2024, 12:21 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Need a specific type a renaming utility or script  (Read 8172 times)

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 145
    • View Profile
    • Donate to Member
Need a specific type a renaming utility or script
« on: February 18, 2023, 11:10 AM »
Posted this on a few other forums but they all were locked for various reasons.


mBHgv.pngNeed a specific type a renaming utility or script

As the image shows I have many files that I would like to move to proper folders. I need these files to move to these folders. This is just a limited example as I need all files to be moved into their proper season folder.


Y:\TD\_Work\Mobile\Game.Theory.with.Bomani.Jones.S02E02.AAC.MP4-Mobile.mp4
Y:\TD\_Work\Mobile\Gold.Lies.and.Videotape.S01E05.The.Monster.AAC.MP4-Mobile.mp4
Y:\TD\_Work\Mobile\Graveyard.Carz.S16E02.AAC.MP4-Mobile.mp4
Y:\TD\_Work\Mobile\Full.Swing.2023.S01E08.AAC.MP4-Mobile.mp4

Y:\TD\_Work\Mobile\Game.Theory.with.Bomani.Jones.S02.AAC.MP4-Mobile
Y:\TD\_Work\Mobile\Gold.Lies.and.Videotape.S01.The.Monster.AAC.MP4-Mobile
Y:\TD\_Work\Mobile\Graveyard.Carz.S16.AAC.MP4-Mobile
Y:\TD\_Work\Mobile\Full.Swing.2023.S01.AAC.MP4-Mobile


The script needs to be able to read the files name to the season:

Full.Swing.2023.S01
and then move it to the folder:
Full.Swing.2023.S01.AAC.MP4-Mobile.

I have looked through many websites today and many that I found just want to make a folder with the file's name instead of moving it to a season folder.

This is for Windows 10 batch file. Making folders is not necessary but if possible adding that would be even better at saving time.

Also wanted to add that I would be just running this inside only one folder. No need for paths. Just move files into designated folders.

--edit
I was asked to clarify. Not sure where I am not clear.

My current method.
Remove all video files to one directory.
From there move files by hand to previously created directories.
If a new directory is needed I use a files2folders app that is installed.
To get to a proper season format I manually edit the folder's name and remove episode numbers.


@echo off
for %%a in (*.*) do (
md "%%~na" 2>nul
move "%%a" "%%~na"
)


That script is not needed as it does all files into individual folders. I do not need all files in their own folders. Almost every script I found currently is some form of this.


If you looking for more information than this I can not provide more as everything I am doing is done by hand. I know just enough about scripting to modify simple code to suit my needs but beyond that, I am at a loss. My career path was military/construction/nurse. Nothing with coding.

publicdomain

  • Honorary Member
  • Joined in 2019
  • **
  • Posts: 736
  • Call me Vic!
    • View Profile
    • Donate to Member
Re: Need a specific type a renaming utility or script
« Reply #1 on: February 18, 2023, 12:42 PM »
Hello again! I'm making it as a Windows Explorer menu for ease of use :Thmbsup:

Source code: https://github.com/p...omain/collect-season

Cheers!
Vic
My name's Victor but do feel free to call me Vic! (now known as "paradisusvic")

❤️ Support on Patreon @ www.patreon.com/paradisusis
New Email/Paypal: paradisusvicgmail.com

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 145
    • View Profile
    • Donate to Member
Re: Need a specific type a renaming utility or script
« Reply #2 on: February 18, 2023, 05:43 PM »
Hello again! I'm making it as a Windows Explorer menu for ease of use :Thmbsup:

Source code: https://github.com/p...omain/collect-season

Cheers!
Vic

Love to try it when you're done.

Enjoy it and tell me if it does what you wanted it to do.  :Thmbsup:

Starting folder:
https://i.ibb.co/FHPdTL6/explorer-Ej-S7-Q3r7-Ra.png
Need a specific type a renaming utility or script


After using your program:
https://i.ibb.co/9VpFYVc/explorer-zai8-SEfw-Xs.png
Need a specific type a renaming utility or script


What is actually needed.
https://i.ibb.co/YPgF48r/explorer-tlqa7f-Jld7.png
Need a specific type a renaming utility or script


It is getting caught on the names of the episodes and creating unneeded folders. I am guessing it looks for E** and then removes it to get a folder name.

Maybe removing everything from E** through the common next characters. 480p/576p/720p/1080p/2160p/XviD/HEVC/Rereip/BDRip/AAC/DVDRip/PDTV.

Might be better if they fail if it is not between E** and 480p/576p/720p/1080p/2160p as these are the most common.

Since I will be using this pretty much in the same directories at all times think you can have it create an INI file that can be edited for now to see how it works on my end at catching the names?

And these files failed to be move with the program.

https://i.ibb.co/r7gRrWj/explorer-RHq3lmq1-Mc.png
Need a specific type a renaming utility or script
« Last Edit: February 18, 2023, 06:03 PM by nickodemos »

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: Need a specific type a renaming utility or script
« Reply #3 on: February 18, 2023, 06:00 PM »
It is getting caught on the names of the episodes and creating unneeded folders. I am guessing it looks for E** and then removes it to get a folder name.
Yes, "S00E00" is the only pattern my app is looking for. You sound anyway more awaiting others contribution so I remove mine.

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 145
    • View Profile
    • Donate to Member
Re: Need a specific type a renaming utility or script
« Reply #4 on: February 18, 2023, 06:05 PM »
It is getting caught on the names of the episodes and creating unneeded folders. I am guessing it looks for E** and then removes it to get a folder name.
Yes, "S00E00" is the only pattern my app is looking for. You sound anyway more awaiting others contribution so I remove mine.

No. Yours is working well. Just a few hiccups. I posted my ideas and would love to follow through.

--edit

And while things are going well right now others who are in the same situation might like another option. Believe me, I will be posting this thread in my signature link media sites so others can come and try what you both are putting out. Already what you have done is going to save me an ungodly amount of time doing things manually. So please keep helping so I can quickly get these season packs combined and uploaded so others can benefit.

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: Need a specific type a renaming utility or script
« Reply #5 on: February 18, 2023, 06:22 PM »
What you want, "blabla SxxExx blabla some changing text that has to stay.ext" -> "blabla Sxx some changing text that has to stay" is not matching in my code.
My code works on a single file base to compute/guess a good foldername to put file in.
As a compromise, I cut right after the season number to have something logical, what I do see on your image is just human logical but works not for a single file mechanism.
So if you are okay with "blabla SxxExx blabla something that has to stay.ext" -> "blabla Sxx" I can do.

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 145
    • View Profile
    • Donate to Member
Re: Need a specific type a renaming utility or script
« Reply #6 on: February 18, 2023, 07:26 PM »
Nope. Leave it as is. Doing "blabla Sxx" leaves me with adding all the extra information. As is what you have done cuts out a good 80% of my work. For that I thank you.

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: Need a specific type a renaming utility or script
« Reply #7 on: February 18, 2023, 09:41 PM »
480p/576p/720p/1080p/2160p/XviD/HEVC/Rereip/BDRip/AAC/DVDRip/PDTV
Integrated those patterns.
Fixed a bug that not accepted season/episode combination.

Beside "00.00" as season/episode it should now work as you wanted.

Tell me if it still has bugs to fix.
« Last Edit: February 18, 2023, 10:15 PM by KodeZwerg »

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: Need a specific type a renaming utility or script
« Reply #8 on: February 18, 2023, 09:46 PM »
And why my first release was not working like you had expected it to be?
A programmer is just as good as the information he gets.
Y:\TD\_Work\Mobile\Game.Theory.with.Bomani.Jones.S02E02.AAC.MP4-Mobile.mp4
Y:\TD\_Work\Mobile\Gold.Lies.and.Videotape.S01E05.The.Monster.AAC.MP4-Mobile.mp4
Y:\TD\_Work\Mobile\Graveyard.Carz.S16E02.AAC.MP4-Mobile.mp4
Y:\TD\_Work\Mobile\Full.Swing.2023.S01E08.AAC.MP4-Mobile.mp4

Y:\TD\_Work\Mobile\Game.Theory.with.Bomani.Jones.S02.AAC.MP4-Mobile
Y:\TD\_Work\Mobile\Gold.Lies.and.Videotape.S01.The.Monster.AAC.MP4-Mobile
Y:\TD\_Work\Mobile\Graveyard.Carz.S16.AAC.MP4-Mobile
Y:\TD\_Work\Mobile\Full.Swing.2023.S01.AAC.MP4-Mobile
As you can see, you did not cut in your example the name of the episode, you did exactly what I did, you just removed the "E00"

Shades

  • Member
  • Joined in 2006
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Need a specific type a renaming utility or script
« Reply #9 on: February 18, 2023, 09:49 PM »
Or go to a site like
Spoiler
Rarbg.com

and download full seasons sets there. Those have the folder name format you require, plus all files neatly sorted and more often than not subs included.

You'll need to be a little more patient this way, but getting better sources saves you a lot of work. That or figure out how the
Spoiler
SONARR/SabNZB

tools work and fully automate the retrieval and optional renaming of the file types you show in your screenshots + storing these in folders (with formatted names). Which can then be used in a solution like Plex or Jellyfin to have a sort of Netflix-like experience in your home network.

Spoiler
SONARR

can already be used for sorting with the collection of files you have obtained.

Note to moderator: Feel free to remove this post, if you deem the spoiler content too controversial or going against rules I'm not aware of.

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 145
    • View Profile
    • Donate to Member
Re: Need a specific type a renaming utility or script
« Reply #10 on: February 18, 2023, 10:07 PM »
100% -- Media files were moved to new folders
90% -- Naming of folders. Only two issues.
 1) The file extension was left on the end of the folders
 2) Only the enlisted folders did not name correctly.

https://i.ibb.co/2n29v9M/explorer-2imy-JJf-Qj-I.png
Need a specific type a renaming utility or script


Now I made a mistake.

480p/576p/720p/1080p/2160p/XviD/HEVC/Rereip/BDRip/AAC/DVDRip/PDTV

Should have been: Rerip



nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 145
    • View Profile
    • Donate to Member
Re: Need a specific type a renaming utility or script
« Reply #11 on: February 18, 2023, 10:14 PM »
Or go to a site like
Spoiler
Rarbg.com

and download full seasons sets there. Those have the folder name format you require, plus all files neatly sorted and more often than not subs included.

You'll need to be a little more patient this way, but getting better sources saves you a lot of work. That or figure out how the
Spoiler
SONARR/SabNZB

tools work and fully automate the retrieval and optional renaming of the file types you show in your screenshots + storing these in folders (with formatted names). Which can then be used in a solution like Plex or Jellyfin to have a sort of Netflix-like experience in your home network.

Spoiler
SONARR

can already be used for sorting with the collection of files you have obtained.

Note to moderator: Feel free to remove this post, if you deem the spoiler content too controversial or going against rules I'm not aware of.


Thanks, but I am one of those people who upload the season packs to multiple websites. The programs you listed are nice but they have been getting a bit of a bad reputation that many sites are now starting to warn/ban people who are using them. I imagine that now they are fairly popular and easy to use that sites are getting pounded with constant information requests. Right now I download series episodes through RSS as they are accepted on almost all sites.

For many shows, I have to wait months after the first episode was uploaded before the pack is even ready for uploading. A great deal of time and effort goes into this and this is why I asked for a shortcut script. KodeZwerg small utility has saved me a great deal of time as now all I need to do is run it and it is done.

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: Need a specific type a renaming utility or script
« Reply #12 on: February 18, 2023, 10:14 PM »
Give me filenames that not work as text I can copy/paste.

//since i removed manual and you wanted to share it to others, here again:
extract archive into any folder
run the .exe file with administrator right (if logged on with admin account, no need to run as admin)
press [Install]
to remove my tool, do above steps but press [Uninstall]
from now on you having a context menu entry "KZ - Folder of series" when you right click on any folder

my app, executed on a folder, will work blazing fast to put files into its own folder collection
fully based on two things, "S00E00" as season/episode tags and the patterns to exclude episode names

my app does not offer any kind of undo, you must know what you are doing (!!)
i am not responsable for any kind of damage that might happen.
software is free of use.

Enjoy!
« Last Edit: February 19, 2023, 05:50 PM by KodeZwerg »

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 145
    • View Profile
    • Donate to Member
Re: Need a specific type a renaming utility or script
« Reply #13 on: February 18, 2023, 10:42 PM »
As of right now 100% green across the board.

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: Need a specific type a renaming utility or script
« Reply #14 on: February 18, 2023, 11:08 PM »
As of right now 100% green across the board.
Good to know, case closed  :D

nickodemos

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 145
    • View Profile
    • Donate to Member
Re: Need a specific type a renaming utility or script
« Reply #15 on: February 19, 2023, 12:03 AM »
Gah! Tried it against 3,659 files. There were a few others but I know why they did not work. So out of 3,659 files, these 15 did not move.

Street.Outlaws.S19E00.Respect.Your.Roots.AAC.MP4-Mobile.mp4
Street.Outlaws.S19E00.Respect.Your.Roots.XviD-AFG.avi
Street.Outlaws.S19E01.AAC.MP4-Mobile.mp4
Street.Outlaws.S19E01.XviD-AFG.avi
Street.Outlaws.S19E02.AAC.MP4-Mobile.mp4
Street.Outlaws.S19E02.XviD-AFG.avi
Street.Outlaws.S19E03.AAC.MP4-Mobile.mp4
Street.Outlaws.S19E03.XviD-AFG.avi
Street.Outlaws.S19E05.AAC.MP4-Mobile.mp4
Street.Outlaws.S19E05.XviD-AFG.avi
Street.Outlaws.S19E06.AAC.MP4-Mobile.mp4
Street.Outlaws.S19E06.XviD-AFG.avi
Street.Outlaws.S19E07.1080p.HEVC.x265-MeGusta.mkv
Street.Outlaws.S19E07.AAC.MP4-Mobile.mp4
Street.Outlaws.S19E07.XviD-AFG.avi

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: Need a specific type a renaming utility or script
« Reply #16 on: February 19, 2023, 04:22 AM »
fixed in above post.
bug was a coincidence, my check was, if that element begin with "S" and on given location is also a "E" present, its a S00E00 thing.
now that testing is deeper, checks are done if "00/00" are present as numbers.

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: Need a specific type a renaming utility or script
« Reply #17 on: February 19, 2023, 05:50 PM »
New download location with updated features.