using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace ConsoleApplicationTest
{
class Program
{
static void Main(string[] args)
{
FileSystemWatcher watcher = new FileSystemWatcher();
watcher.Path = @"c:\";
watcher.Renamed += new RenamedEventHandler(watcher_Renamed);
watcher.EnableRaisingEvents = true;
Console.ReadLine();
}
static void watcher_Renamed(object sender, RenamedEventArgs e)
{
Console.WriteLine("Renamed from {0} to {1}", e.OldFullPath, e.FullPath);
}
}
}
Thursday, September 22, 2011
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment