Process cmd = new Process()
cmd.StartInfo.FileName = "cmd"
cmd.StartInfo.RedirectStandardOutput = true
cmd.StartInfo.RedirectStandardInput = true
cmd.StartInfo.UseShellExecute = false
cmd.StartInfo.CreateNoWindow = falsecmd.Start()
cmd.StandardInput.WriteLine(@"d:\a.doc")//这里可以换纳尺成从文洞老高件对含氏话框取得文件名
cmd.Close()
rivate void button1_Click(object sender, EventArgs e){
openFileDialog1.ShowDialog()
foreach (string filename in openFileDialog1.FileNames)
{
int start = filename.LastIndexOf( '冲渣则\\梁搜'散棚)
string str = filename.Substring(start + 1,filename.Length - start - 1)
listView1.Items.Add(new ListViewItem(str))
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)