<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.IO;

    namespace TemplateFileDelete
    {
        public partial class DeleteFiles : Form
        {
            int i = 0;
            public DeleteFiles()
            {
                InitializeComponent();
            }

            private void BtOpen_Click(object sender, EventArgs e)
            {
                DealAction(sender, e);
            }

            private void BtOpen2_Click(object sender, EventArgs e)
            {
                DealAction(sender, e);
            }
            public void DealAction(object sender, EventArgs e)
            {
                fbdShow.ShowDialog();
                Button bt = (Button)(sender);
                if (bt.Name == "BtOpen")
                {
                    this.TbPath1.Text = fbdShow.SelectedPath;
                }
                else if (bt.Name == "BtOpen2")
                {
                    this.TbPath2.Text = fbdShow.SelectedPath;
                }

            }
            public void Dirs(string path)
            {
                DirectoryInfo dis = new DirectoryInfo(path);
                FileInfo[] files = dis.GetFiles();
                foreach (FileInfo fi in files)
                {
                    i++;
                    Application.DoEvents();
                    this.label1.Text = i.ToString();
                    try
                    {
                        File.Delete(fi.FullName);
                    }
                    catch (Exception ex)
                    {
                        this.richTextBox1.Text += ex.Message;
                 
                    }
              
                  //  GetSqlFile(fi.FullName, this.textBox1.Text + fi.DirectoryName.Substring(2), fi.FullName.Substring(fi.FullName.LastIndexOf("\\") + 1), 1024, 768);
                }
                if (dis.GetDirectories().Length > 0)
                {
                    for (int i = 0; i < dis.GetDirectories().Length; i++)
                    {
                        Dirs(dis.GetDirectories()[i].FullName);
                    }
                }


            }

            private void BtDelete_Click(object sender, EventArgs e)
            {
                Dirs(this.TbPath1.Text.Trim());
                Dirs(this.TbPath2.Text.Trim());
            }

        }
    }


    文章來(lái)源:http://www.cnblogs.com/wangdetian168/archive/2008/12/21/1359315.html
    posted on 2010-09-28 10:54 sanmao 閱讀(91) 評(píng)論(0)  編輯  收藏

    只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


    網(wǎng)站導(dǎo)航:
     

    常用鏈接

    留言簿(5)

    隨筆分類

    隨筆檔案

    搜索

    •  

    最新評(píng)論

    閱讀排行榜

    評(píng)論排行榜

    主站蜘蛛池模板: 你是我的城池营垒免费观看完整版 | 在线精品自拍亚洲第一区| 亚洲熟妇无码乱子AV电影| 午夜小视频免费观看| 永久免费在线观看视频| 国产永久免费高清在线| 高清免费久久午夜精品| 韩国亚洲伊人久久综合影院| 亚洲乱码卡三乱码新区| 亚洲综合日韩中文字幕v在线| 国产午夜亚洲不卡| 亚洲 综合 国产 欧洲 丝袜| 我要看WWW免费看插插视频| 1000部拍拍拍18勿入免费视频下载| a毛片在线免费观看| 一区二区三区免费视频观看| 亚洲精品无码国产片| 亚洲av极品无码专区在线观看| 亚洲网址在线观看你懂的| 亚洲欭美日韩颜射在线二| 国产成人99久久亚洲综合精品| 在线免费观看韩国a视频| 日本精品人妻无码免费大全 | 亚洲AV午夜成人影院老师机影院 | 人与动性xxxxx免费| 国产精品亚洲专区无码WEB| 亚洲国产系列一区二区三区| 亚洲人成在线中文字幕| 亚洲视频一区在线| 亚洲第一页在线视频| 亚洲日本在线看片| 久久精品国产精品亚洲毛片| 亚洲人成网www| 337p日本欧洲亚洲大胆色噜噜| 精品亚洲麻豆1区2区3区| 亚洲国产精品无码久久久| 亚洲男女性高爱潮网站| 亚洲人成网网址在线看| 亚洲欧洲无卡二区视頻| 鲁死你资源站亚洲av| 日韩一区二区三区免费播放|