如题

解决方案 »

  1.   

    System.IO.File Exists(
    string path
    )
      

  2.   

      //获得当前文件夹下所有文件夹
       string[] dirstr = Directory.GetDirectories(path);
    剩下的你懂的?
      

  3.   

    if(Directory.GetFiles(@"路径").Length>0)
      

  4.   

    //文件是否存在            
    if (System.IO.File.Exists(@"C:\360Rec\ss.txt"))
                {
                    MessageBox.Show("存在");
                
                }
                else
                {
                    MessageBox.Show("不存在");
                }//注意:文件夹是否存在用:System.IO.Directory.Exists
      

  5.   

    string[] files = Directory.GetFiles(@"目录");
    然后判断files组的数量,你懂的。
      

  6.   

    http://blog.csdn.net/xianfajushi/article/details/7671523含检查文件夹和文件
      

  7.   

    DirectoryInfo di=new DirectoryInfo("d:\\fff\\");
    FileSystemInfo[] fsi=di.GetFileSystemInfos();
    if(fsi.Count>0)
       ...........................大概就是这个样子