Join several .vob files

Discuss and share scripts and script files...
Post Reply
highend
Posts: 14940
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Join several .vob files

Post by highend »

Is there an easy way to use the "copy /b a + b + ... + x output" command to join several .vob files and let it output a new one?

My problem is how I make sure that the (manually) selected files are processed in the right order, regardless of the order in which they were selected.

Normally the .vobs are named like this: VTS_01_1.VOB, VTS_01_2.VOB, etc. so I would need some kind of sort algorithm that puts the file with the lowest number at first place, file with number +1 to second, etc. before the copy /b command is invoked.

Could need a bit of help with that part :)

Tia,
highend
One of my scripts helped you out? Please donate via Paypal

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: Join several .vob files

Post by Stefan »

highend wrote:My problem is how I make sure that the (manually) selected files are processed in the right order, regardless of the order in which they were selected.

Normally the .vobs are named like this: VTS_01_1.VOB, VTS_01_2.VOB, etc. so I would need some kind of sort algorithm that puts the file with the lowest number at first place, file with number +1 to second, etc. before the copy /b command is invoked.
It's no matter in which order you select the files, the get() command reports them in the right alphabetic order.

Try

select
1. VTS_01_1.VOB
2. VTS_01_3.VOB
3. VTS_01_4.VOB
4. VTS_01_2.VOB

then use
::$ITEMS = get("SelectedItemsPathNames"); text $ITEMS;
or
::$ITEMS = get("SelectedItemsNames"); text $ITEMS;

you get
VTS_01_1.VOB
VTS_01_2.VOB
VTS_01_3.VOB
VTS_01_4.VOB

highend
Posts: 14940
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Join several .vob files

Post by highend »

Thank you, Stefan!

I wasn't aware that the get function works this way (didn't find a sort function inside the scripting part of the help file and was afraid that the manual selection would cause problems without a sort function inside the script).

The rest is simple :)

Regards,
highend
One of my scripts helped you out? Please donate via Paypal

Post Reply