对文件夹进行操作-操作文件夹

    protected void Page_Load(object sender, EventArgs e)
    {
        DirectoryInfo d 
= Directory.CreateDirectory("c:\\first");
        DirectoryInfo d1 
= d.CreateSubdirectory("first1");
        DirectoryInfo d2 
= d1.CreateSubdirectory("first1_1");
        Directory.SetCurrentDirectory(
"c:\\first");
        Directory.CreateDirectory(
"first2");
        Directory.CreateDirectory(
"first2\\first2_1");
    }
posted @ 2007-05-21 15:06  齐心  Views(228)  Comments(0Edit  收藏  举报