C # code
Public static void transformfile (string filepath)
{
String fppath = system. configuration. configurationmanager. deleetpipeline ["flashpaper"];
String outpath = filepath. substring (0, filepath. lastindexof ('.') + ". SWF ";
String Param = fppath + "" + filepath + "-o" + outpath;
PROCESS p = new process ();
P. startinfo. filename = "C: \ WINDOWS \ system32 \ cmd.exe ";
P. startinfo. useshellexecute = false;
P. startinfo. redirectstandardinput = true;
P. startinfo. redirectstandardoutput = true;
P. startinfo. redirectstandarderror = true;
P. startinfo. createnowindow = true;
// P. startinfo. windowstyle = system. Diagnostics. processwindowstyle. hidden;
Try
{
P. Start ();
String stroutput = NULL;
P. standardinput. writeline (PARAM );
P. standardinput. writeline ("exit ");
Stroutput = P. standardoutput. readtoend ();
Console. writeline (stroutput );
P. waitforexit ();
P. Close ();
}
Catch (exception ex)
{
Throw ex;
}
}
Note: If the operation fails, it is a permission issue. Take IIS as an example. Authorize iusr_xxx to the read/write folder.