FORUMS: list search recent posts

unable to delete original file through c++/cli

COW Forums : FFmpeg

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Prakash Choudhary
unable to delete original file through c++/cli
on Dec 23, 2015 at 8:23:41 pm

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 error

unable to find suitable format for '&&'
&&: invalid aurgument

following 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;


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved