时间:2010-07-25 18:21:18

标签: c#

2 个答案:

答案 0 :(得分:3)

答案 1 :(得分:2)

sdelete通过c#中的进程运行此命令。

Process p = new Process();
p.StartInfo = new ProcessStartInfo( "cmd", "/c sdelete -p 1 -s -z -q -a 'path/to/director' )
    {
        RedirectStandardOutput = true,
        UseShellExecute = false,
        CreateNoWindow = true
    };
p.Start();
string output = p.StandardOutput.ReadToEnd();
p.WaitForExit();

sdelete可以是downloaded here