I'm working on a video piece by piece, saved with the filenames `scene1.avi`, `scene2.avi` and so on.

I want an easy way to build the video into one block and dub in the audio track. For this purpose, I'm using VirtualDub.

Now, it's simple enough for me to open VirtualDub, go through File => Open, load the first scene, go to File => Append video segment, select the second scene, check the "autodetect additional segments by filename" option, set the video to Direct Stream Copy, set the audio to "from other file" and choose the soundtrack, then save the whole thing as `out.avi`... but it takes four lines just to explain all that!

What I'd like is a VCF script to build all these files together. Unfortunately, the coding language sucks.

> 
> I don't know what I was thinking when I created this scripting language. It's
>  very loosely based on C, but it sucks more. I must have been watching Bubblegum
>  Crisis before I created it.  
> 
>  All statements are either declarations or expressions, and all statements
>  must end in a semicolon. There is no flow control -- no functions, no
>  procedures, no if, no while, no for, no switch, no goto.
> 
> 
> 

No `if`, no `while`, no `for`... so I guess `while file exists("scene"+i+".avi") {VirtualDub.Append("scene"+i+".avi"); i++;}` is completely out of the question.

I am using a Batch script to check for the existence of the VCF file and run VirtualDub with the correct command line to run the script, so perhaps I might be able to use that script to "build" the VCF file needed to include all the files? Is there any way to autodetect the segments in the VCF file, or will I have to custom-build the VCF using the Batch script?