/// <summary>
        /// 删除文件夹下面所有图片
        /// </summary>
        /// <param name="oldpngPath">待删除文件路径</param>
        /// <param name="newpngPath">删除到的新目录</param>
        /// <param name="geshi">操作文件的格式 例如:*.png、*.xml</param>
        public void deleteAll(string delpath, string geshi)
        {
            string[] files = Directory.GetFiles(delpath, geshi);
            foreach (string file in files)
            {
                File.Delete(file);
            }
        }

 

        /// <summary>
        /// 复制文件夹下面所有图片
        /// </summary>
        /// <param name="oldpngPath">待复制文件路径</param>
        /// <param name="newpngPath">复制到的新目录</param>
        /// <param name="geshi">操作文件的格式 例如:*.png、*.xml</param>
        public void copyALl(string oldpngPath, string newpngPath, string geshi)
        {

            string[] files = Directory.GetFiles(oldpngPath, geshi);
            foreach (string file in files)
            {
                string otherFile = Path.Combine(oldpngPath, Path.GetFileName(file));
                File.Copy(file, newpngPath + "\\" + Path.GetFileName(file));
            }

        }

 

       /// <summary>
        /// 移动文件夹下的所有文件
        /// </summary>
        /// <param name="olderpath">待移动的文件目录</param>
        /// <param name="topath">新目录</param>
        public void moveAll(string olderpath, string topath)
        {
            string[] files = Directory.GetFiles(delpath, geshi);
            foreach (string file in files)
            {
                File.Move(file, topath); //移动文件
            }
        }