新建文件夹

 System.IO.DirectoryInfo dir = new System.IO.DirectoryInfo(this.TextBox1.Text.Trim());
        if(dir.Exists)
        {
            this.Button2.Text = "文件以存在";
        }
        else
        {
            dir.Create();
            this.Button2.Text = "文件创建成功";
        }
posted on 2008-05-26 13:23  freexiaoyu  阅读(250)  评论(0编辑  收藏  举报