
/// <summary>
/// 指定路径删除文件夹
/// 注意:文件夹的删除要求指定路径文件夹必须存在
/// </summary>
/// <param name="strPath">路径</param>
public void deleteMyDirectory ( string strPath )
{
if ( Directory.Exists ( strPath ) ) //指定路径上文件夹是否存在
{
Directory.Delete ( strPath ); //删除文件夹
MessageBox.Show ( "删除成功!" );
}
else
{
MessageBox.Show ( "指定路径上不存在此文件夹!" );
}
}




by: 发表于:2018-02-02 09:53:54 顶(0) | 踩(0) 回复
??
回复评论