日期:2014-05-17 浏览次数:20965 次
private void Form1_Load(object sender, EventArgs e)
{
this.fileSystemWatcher1.Path = @"C:\Users\guwei4037\Desktop";
this.fileSystemWatcher1.Renamed += fileSystemWatcher1_Renamed;
}
private void fileSystemWatcher1_Renamed(object source, RenamedEventArgs e)
{
MessageBox.Show(string.Format("File: {0} renamed to {1}", e.OldFullPath, e.FullPath));
}