I'm using the following code to copy the exif data from one file to another using exiftool.
When directly run from command line,the tool is quick.But when the command is executed from a winform app,it takes much greater time.What is going wrong here? Please advice. Is there any alternative way to achieve this?
foreach(string cpath in filelist)
{
string path = "-overwrite_original -TagsFromFile " + "\"" + file + "\"" +" "+ "\"" + outdir + "\\" + Path.GetFileNameWithoutExtension(file) + ext + "\"";
runCmd(path);
}
public void runCmd(string command)
{
ProcessStartInfo cmdsi = new ProcessStartInfo("exiftool.exe");
cmdsi.WindowStyle = ProcessWindowStyle.Hidden;
cmdsi.Arguments = command;
Process cmd = Process.Start(cmdsi);
cmd.WaitForExit();
}