| 123456789101112131415161718192021222324252627282930313233343536373839 |
- using System;
- using System.IO;
- using System.Runtime.InteropServices;
- using System.Text;
- using System.Threading;
- using System.Windows.Forms;
- namespace FileWatcher
- {
- public partial class Form3 : Form
- {
- public Form3()
- {
- InitializeComponent();
- }
- private void Form3_Load(object sender, EventArgs e)
- {
-
- }
- private void button1_Click(object sender, EventArgs e)
- {
- GetFile(textBox1.Text);
- }
- void GetFile(string FilePath) {
- DirectoryInfo root = new DirectoryInfo(FilePath);
- DirectoryInfo[] dics = root.GetDirectories();
- for (int i = 0; i < dics.Length; i++)
- {
- GetFile(dics[i].FullName);
- richTextBox2.AppendText(dics[i].Name+"\n");
- }
- }
- }
- }
|