是分驱,还是。。。。<br>创建文件夹:<br>procedure TForm1.btnCreateClick(Sender: TObject);<br>begin<br> CreateDirectory(PChar(ExtractFilePath(ParamStr(0))+'Test'),nil);//创建<br>end;<br><br>procedure TForm1.btnDeleteClick(Sender: TObject);<br>var<br> T:TSHFileOpStruct;<br> P:String;<br>begin<br> P:=ExtractFilePath(ParamStr(0))+'Test';<br> with T do<br> begin<br> Wnd:=0;<br> wFunc:=FO_DELETE;<br> pFrom:=PChar(P);<br> pTo:=nil;<br> fFlags:=FOF_ALLOWUNDO+FOF_NOERRORUI;<br> hNameMappings:=nil;<br> lpszProgressTitle:='正在删除文件夹';<br> fAnyOperationsAborted:=False;<br> end;<br> SHFileOperation(T);<br> //RemoveDirectory(PChar(ExtractFilePath(ParamStr(0))+'Test'));<br>end;