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

     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 " );
    }

你可能感兴趣的:(操作文件)