Exelio 0 Junior Poster in Training

hi all,

I need to monitor a folder (also for the subdirectories) for changes or renaming. i am trying to use the File system watcher control and has set the path of the directory.

i have written code in the rename event of filesystem watcher

public void OnRenameEvent(Object sender, RenamedEventArgs e)
{
MessageBox.Show(e.OldName);
}

i have set the EnableRaisingEvents as true. but still when i am trying to rename the folder, the event is not getting triggered.

What am i missing here?


Thanks in advance.

Regards

Exelio

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.