File System Watcher Changed/Renamed event

Discussion in 'ASP .Net' started by Stephen, Jan 12, 2006.

  1. Stephen

    Stephen Guest

    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 and copy it there

    Problem:
    If i try to rename "Text.txt" to "NewText.txt" then I wanted to rename
    "Text.txt" in Temp2 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
     
    Stephen, Jan 12, 2006
    #1
    1. Advertising

  2. Stephen

    Stephen Guest

    Thanks all,

    Found the solution...

    Stephen

    "Stephen" <> wrote in message
    news:...
    > 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 and copy it there
    >
    > Problem:
    > If i try to rename "Text.txt" to "NewText.txt" then I wanted to rename
    > "Text.txt" in Temp2 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
    >
    >
     
    Stephen, Jan 13, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ray5531

    Watcher component

    Ray5531, May 12, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    388
    =?Utf-8?B?RWx0b24gVw==?=
    May 12, 2005
  2. stephen

    Question on File System Watcher

    stephen, May 31, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    421
    stephen
    May 31, 2006
  3. =?Utf-8?B?QXZp?=
    Replies:
    1
    Views:
    534
    =?Utf-8?B?TWlsb3N6IFNrYWxlY2tpIFtNQ0FEXQ==?=
    May 21, 2007
  4. smartnhandsome

    Simple File Watcher

    smartnhandsome, Oct 16, 2007, in forum: Java
    Replies:
    3
    Views:
    702
    smartnhandsome
    Oct 17, 2007
  5. Amarpal
    Replies:
    2
    Views:
    897
    harsha
    Dec 31, 2011
Loading...

Share This Page