-
unable to delete original file through c++/cli
just wanted to delete the original file after conversion..
when i run the following command through command prompt in windows there is no issue .ffmpeg.exe -y -i D:\old.avi D:\new.avi && D:\del D:\old.avi
but if i run the same command from System::Diagnostics::Process ^process, ffmpeg shows errorunable to find suitable format for ‘&&’
&&: invalid aurgumentfollowing command as an argument gives no error at System::Diagnostics::Process ^process
-y -i D://old.avi D://new.avi
is there a way to pass 2 commands in one go? like in command prompt?
below is my code in c++/cli
String ^location = System::Reflection::Assembly::GetEntryAssembly()->Location;
String^ ExecutableDirectory = System::IO::Path::GetDirectoryName(location);
System::Diagnostics::Process ^process = gcnew System::Diagnostics::Process();
System::Diagnostics::ProcessStartInfo^ startInfo = gcnew System::String^ Arguments = "-y -i D://old.avi D://new.mp4 && del D://old.avi";
System::Diagnostics::ProcessStartInfo(ExecutableDirectory+"//ffmpeg.exe", Arguments);
startInfo->WindowStyle = System::Diagnostics::ProcessWindowStyle::Maximized;
process->StartInfo = startInfo;
process->Start();Thanks
Sorry, there were no replies found.