Home All Groups Group Topic Archive Search About

file watcher renamed event problem

Author
13 Jan 2006 3:52 PM
Stephen
Hi all,

I am stuck with a problem and wanted some guidance. I am using
FileSystemWatcher to monitor a folder "C:\Temp1" and updating "C\Temp2" say
somthing happens in Temp1, I want to update Temp2

Say I create "Text.txt" in Temp1, in the created event I check for whether
"Text.txt" is present in Temp2 else copy it there

Problem:
If i try to rename "Text.txt" to "NewText.txt" in the renamed event I want
to rename "Text.txt" in Temp2 folder to "NewText.txt" but I cant delete
"Text.txt" and make it "NewText.txt", it has both files "Text.txt" and
"NewText.txt"

Hope I am making sense

Please advice,
Stephen

AddThis Social Bookmark Button