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.