@dearleuk As promised I have attached the script I use to file/organise DVROnTime recordings. Hopefully you will find it useful, from the readme...
What does it do?
1. It attempts to categorise recordings as Movies, TV Series or Single Episodes and file them accordingly into 3 main subdirectories.
2. It names the files in a Kodi friendly way, which can be customised via the script with minimal coding, and are in the right order when files are sorted by name.
3. It uses the Episode NFO files of DVROnTime to achieve this, extracting information via Regular expressions from the guide text (plot) and not relying on what DVROntime has or has not extracted itself...
4. It can optionally use OMDB lookups to help identify/classify and to create better NFO files.
5. It can be run non destructively (no arguments) which generates a report of what it would do without moving any files or with an additional /file argument, where recordings are classified and moved into directories.
6. It can be run locally on the DVROnTime server machine or remotely if you setup a share to your DVROnTime recordings directory (using a UNC or network drives)
7. When filing all files are moved from the DVROntime recordings location to the filing location(s). After all files in a subdirectory directory of DVROntime have been filed the empty sub directory is removed from the DVROnTime recordings directory.
8. No backups are taken. If a move fails for some reason (like lack of space) the script should stop at that point and abort.
What are the requirements?
1. The script needs to be customised for your environment before it can be used
2. It only works if you have the Episode NFO data file option ticked as it uses the information in those NFO files to extract all the programme info for classification and filing.
3. If you want to take advantage of the OMDB lookups for Movies/TV Series you need to register for a free (with a daily limit restriction) developer key (see customisation section)
4. It's written in VbScript and only runs under the CScript engine (i.e. command line output).
Disclaimers (you have been warned!!!)
1. The script was knocked up from various bits of other scripts to do a job and has had limited testing with my recordings to date. Use it at your own risk and please make sure you run it non destructively first and check the output thoroughly before attempting to file anything!!!!
2. It can only work with the supplied guide data which often has errors/inconsistencies, on occasions it will mis-classify a recording so its not possible to get it right 100% of the time :-(
3. The script was made to meet my requirements (mainly movies), which are not necessarily yours! If you don't like something you have the script source so you can tweak it as you desire
4. There is only minimal error handling so doing something silly in the configuration will likely result in errors.
Example usage - From a CMD (command line window), assuming the script subdirectory is the current directory.
1. cscript dvrontime_filer.vbs (generates a report to the CMD window terminal)
2. cscript dvrontime_filer.vbs >dvrontime_filer_report.txt (generates a report to a dvrontime_filer_report.txt file which can be viewed via notepad etc)
3. cscript dvrontime_filer.vbs >dvrontime_filer_report.txt 2>dvrontime_filer_errors.txt (generates a report to a dvrontime_filer_report.txt file and any errors to dvrontime_filer_errors.txt which can be viewed via notepad etc)
4. cscript dvrontime_filer.vbs /file (generates a report to the CMD window and files recordings accordingly)
5. cscript dvrontime_filer.vbs /file >dvrontime_filer_report.txt (generates a report to a dvrontime_filer_report.txt file and files recordings accordingly)
Example output
Example of a normal movie.
Movie (Found on OMDB) : \\nuc-pc\dvrontime\The Meg 0 28/12/2021 21:00:02 44
\\nuc-pc\dvrontime\The Meg\The Meg 28-12-2021 S0E0.m2ts --> \\NUC-PC\DvrOnTime\_Movies\The Meg (2018).m2ts
\\nuc-pc\dvrontime\the meg\the meg 28-12-2021 s0e0.nfo --> \\NUC-PC\DvrOnTime\_Movies\The Meg (2018).nfo
Example of a split movie (I hate you C5!)
Movie (Found on OMDB) : \\nuc-pc\dvrontime\King Arthur Legend of the Sword 1 27/12/2021 21:04:51 45
\\nuc-pc\dvrontime\King Arthur Legend of the Sword\King Arthur Legend of the Sword 27-12-2021 S0E0.m2ts --> \\NUC-PC\DvrOnTime\
Movies\King Arthur Legend of the Sword (2017) part1.m2ts
\\nuc-pc\dvrontime\king arthur legend of the sword\king arthur legend of the sword 27-12-2021 s0e0.nfo --> \\NUC-PC\DvrOnTime\
Movies\King Arthur Legend of the Sword (2017) part1.nfo
\\nuc-pc\dvrontime\King Arthur Legend of the Sword\King Arthur Legend of the Sword 27-12-2021 1 S0E0.m2ts --> \\NUC-PC\DvrOnTime\
Movies\King Arthur Legend of the Sword (2017) part2.m2ts
\\nuc-pc\dvrontime\king arthur legend of the sword\king arthur legend of the sword 27-12-2021 1 s0e0.nfo --> \\NUC-PC\DvrOnTime\
Movies\King Arthur Legend of the Sword (2017) part2.nfo
Example of a Single episode
Single Episode : \\nuc-pc\dvrontime\Spitting Image Christmas Special 0 24/12/2021 22:03:43 48
\\nuc-pc\dvrontime\Spitting Image Christmas Special\Spitting Image Christmas Special 24-12-2021 S0E0.m2ts --> \\NUC-PC\DvrOnTime\
Single_Recordings\Spitting Image Christmas Special 202112241003.m2ts
\\nuc-pc\dvrontime\spitting image christmas special\spitting image christmas special 24-12-2021 s0e0.nfo --> \\NUC-PC\DvrOnTime\
Single_Recordings\Spitting Image Christmas Special 202112241003.nfo
Example of a full TV series
TV Series (Found on OMDB) : Stephen \\nuc-pc\dvrontime\Stephen 0 13/09/2021 20:00:07 150 3 3 2021 1
\\nuc-pc\dvrontime\Stephen\Stephen 30-08-2021 S1E1.m2ts --> \\NUC-PC\DvrOnTime\_TVSeries\Stephen (2021)\Series 01\Stephen (2021) s01e01.m2ts
\\nuc-pc\dvrontime\stephen\stephen 30-08-2021 s1e1.nfo --> \\NUC-PC\DvrOnTime\_TVSeries\Stephen (2021)\Series 01\Stephen (2021) s01e01.nfo
\\nuc-pc\dvrontime\Stephen\Stephen 06-09-2021 S1E2.m2ts --> \\NUC-PC\DvrOnTime\_TVSeries\Stephen (2021)\Series 01\Stephen (2021) s01e02.m2ts
\\nuc-pc\dvrontime\stephen\stephen 06-09-2021 s1e2.nfo --> \\NUC-PC\DvrOnTime\_TVSeries\Stephen (2021)\Series 01\Stephen (2021) s01e02.nfo
\\nuc-pc\dvrontime\Stephen\Stephen 13-09-2021 S1E3.m2ts --> \\NUC-PC\DvrOnTime\_TVSeries\Stephen (2021)\Series 01\Stephen (2021) s01e03.m2ts
\\nuc-pc\dvrontime\stephen\stephen 13-09-2021 s1e3.nfo --> \\NUC-PC\DvrOnTime\_TVSeries\Stephen (2021)\Series 01\Stephen (2021) s01e03.nfo