Creating a DVD structure

Discuss and share scripts and script files...
Post Reply
flourgrader
Posts: 26
Joined: 30 Dec 2014 15:35

Creating a DVD structure

Post by flourgrader »

Hi Guys,
I am looking for someone to help me out please.
I know nothing about scripting except I believe only a short bit of script
Is what is required to achieve what I want.
I have 1000 DVDs that have been ripped to Hard Drive.
The path is D:\Films\DVD\vob,bup,ifo
Where Folder DVD is the title of the movie, hence that will have to be a variable in the scrip which changes 1000 times?
I need to create new sub folders in DVD Folder and move files to newly created Folder
Here is an example!
the DVD structures must be complete. Thus, in the folder with the name of the film, you must have a folder "VIDEO_TS" and an empty folder "AUDIO_TS". And all DVD files (.vob, .bup, .ifo ...) must be placed in the "VIDEO_TS" folder.
Any help would be well appreciated
Thank You.
:roll:

highend
Posts: 13309
Joined: 06 Feb 2011 00:33

Re: Creating a DVD structure

Post by highend »

DVD = Really the name of the movie in the path, e.g. "Avatar"?

TRY THE SCRIPT WITH SOME TEST DVD FOLDERS FIRST!

Code: Select all

    $src = "D:\Films";

    foreach($movie, quicksearch("/nd", $src), <crlf>, "e") {
        if (exists("$movie\AUDIO_TS") == 0) { new("$movie\AUDIO_TS", "dir"); }
        $files = quicksearch("*.bup;*.ifo;*.vob /nf", $movie, "|");
        moveto "$movie\VIDEO_TS", $files, , 2, 2;
    }
One of my scripts helped you out? Please donate via Paypal

flourgrader
Posts: 26
Joined: 30 Dec 2014 15:35

Re: Creating a DVD structure

Post by flourgrader »

Thank you very much highend I relay appreciated
You taking the time to write the script.
The script does exactly what I wanted.
I wondered if it could be tweaked?
If the script processes a folder which is empty,
Or has no vob,bup,ifo to move.
The script stops with Error message
“Nothing selected, or what is selected cannot be moved.”
This is the line in the script” moveto "$movie\VIDEO_TS", $files, , 2, 2;”
Command "move"failed or was canceled.
D:\FILMS\SPIDERMAN\VIDEO_TS
Some of my Folders have mixed in them MPEG2 or MPEG4 or AVI films .
I can just ignore those Folders and move onto the next folder.
I wondered if there is a way to move onto the next folder in the script each time it
hits an ERROR so the script does not Stop ?
I know I could press continue in Xyplorer.
Thanks again for your time highend.

highend
Posts: 13309
Joined: 06 Feb 2011 00:33

Re: Creating a DVD structure

Post by highend »

Do it like this:

Code: Select all

    $src = "D:\Films";

    foreach($movie, quicksearch("/nd", $src), <crlf>, "e") {
        $files = quicksearch("*.bup;*.ifo;*.vob /nf", $movie, "|");
        if (!$files) { continue; }
        if (exists("$movie\AUDIO_TS") == 0) { new("$movie\AUDIO_TS", "dir"); }
        moveto "$movie\VIDEO_TS", $files, , 2, 2;
    }
One of my scripts helped you out? Please donate via Paypal

flourgrader
Posts: 26
Joined: 30 Dec 2014 15:35

Re: Creating a DVD structure

Post by flourgrader »

Thank you very much highend .
You are Great.
That does exactly what I want. :D
Have a Good Day...

jupe
Posts: 2788
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Creating a DVD structure

Post by jupe »

Yeah it looks like it is un-doing nearly everything from your last script request:

viewtopic.php?f=7&t=13097&p=116077#p116110

:P

Post Reply