Skip to content

Instantly share code, notes, and snippets.

@rjpaddock
Created July 31, 2020 13:52
Show Gist options
  • Save rjpaddock/be601db3995082949071121d8aa992d7 to your computer and use it in GitHub Desktop.
Save rjpaddock/be601db3995082949071121d8aa992d7 to your computer and use it in GitHub Desktop.
C# program to run ccextractor on a directory of files
using System;
using System.Diagnostics;
using System.IO;
namespace ExtractorRunner
{
class Program
{
static void Main(string[] args)
{
var directory_to_import = "D:/Data/clients/RodPaddock/CCExtractor/";
var extractor_exe_path = "D:/Data/clients/RodPaddock/CCExtractor/ccextractorwin";
foreach (var fileName in Directory.GetFiles(directory_to_import,"*.mpg"))
{
Console.WriteLine(fileName);
var process = new Process()
{
StartInfo = new ProcessStartInfo
{
FileName = $"{extractor_exe_path}",
Arguments = $"{fileName}",
UseShellExecute = true,
}
};
process.Start();
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment