Пример #1
0
 /// <summary>
 /// 批量删除操作
 /// </summary>
 /// <returns></returns>
 private string doDelete()
 {
     try
     {
         string[]      filenames       = IRequest.GetQueryString("files").TrimStart(new char[] { ',' }).Split(new char[] { ',' });
         string        langflag        = IRequest.GetQueryString("langflag");
         string        TemplatePathStr = Utils.GetMapPath(ConfigurationManager.AppSettings["TempLatePath"] + langflag);
         DirectoryInfo dirinfo         = new DirectoryInfo(TemplatePathStr);
         FileInfo[]    files           = dirinfo.GetFiles();
         foreach (FileInfo tempfile in files)
         {
             foreach (string filename in filenames)
             {
                 if (tempfile.Name.Equals(filename))
                 {
                     FileManage.DeleteFileFolder(tempfile.FullName);
                     break;
                 }
             }
         }
         return("true");
     }
     catch
     {
         return("false");
     }
 }