473,395 Members | 1,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

File Watcher + Win Service

Hi all.
I'm developing a Windows Explorer like app.

I have my own repository to store the files and a bd where i keep the path
to each file.

I have to watch the repository all time to avoid modifications by other
people. So that, i'm using a win service in wich i implement a file watcher.

I have two basic questions:

1) I'm implementig methods to restore the information in the bd if someome
delete, rename or move a file in my repository. The problem i have is that
the file watcher
throws more than one event for example if someone moves a file. So, how can
i know which other events are waiting in the queue (and eventually how can i
acces and navigate to this queue) or is there another way to restore the
changes made to any file on my repository ??

2) My app also can modify the files in the repository, so, i don't want in
these case the file watcher perform the restore actions !! how can i differ
the changes made by my app or somebody else ?? is there any way to ask if my
app is running or something like that ??

Any suggestions are welcome !!

regards !!

Marcelo López
Inforcorp. Uruguay. Latin America.
Jul 21 '05 #1
2 1753
try http://www.knowdotnet.com/articles/fwrecovery.html
"Marcelo López" <t-********@infocorp.com.uy> wrote in message
news:ev**************@TK2MSFTNGP09.phx.gbl...
Hi all.
I'm developing a Windows Explorer like app.

I have my own repository to store the files and a bd where i keep the path
to each file.

I have to watch the repository all time to avoid modifications by other
people. So that, i'm using a win service in wich i implement a file watcher.
I have two basic questions:

1) I'm implementig methods to restore the information in the bd if someome
delete, rename or move a file in my repository. The problem i have is that
the file watcher
throws more than one event for example if someone moves a file. So, how can i know which other events are waiting in the queue (and eventually how can i acces and navigate to this queue) or is there another way to restore the
changes made to any file on my repository ??

2) My app also can modify the files in the repository, so, i don't want in
these case the file watcher perform the restore actions !! how can i differ the changes made by my app or somebody else ?? is there any way to ask if my app is running or something like that ??

Any suggestions are welcome !!

regards !!

Marcelo López
Inforcorp. Uruguay. Latin America.

Jul 21 '05 #2
Thanks. It is interesting but itsn't what i'm looking for.
Like most of examples i have found about file watchers, this one only logs
information on every event that the file watcher raise the event.
I need the way to track events by group, to restore in a consistent way the
information in my bd. For example, if somebody moves a file from one dir to
another, the file watcher raises 4 events, and i can't solve them
separatily. I have to know which other events are next to the one i'm
analizing everytime,

Marcelo
"William Ryan" <do********@comcast.nospam.net> wrote in message
news:uH**************@TK2MSFTNGP10.phx.gbl...
try http://www.knowdotnet.com/articles/fwrecovery.html
"Marcelo López" <t-********@infocorp.com.uy> wrote in message
news:ev**************@TK2MSFTNGP09.phx.gbl...
Hi all.
I'm developing a Windows Explorer like app.

I have my own repository to store the files and a bd where i keep the path to each file.

I have to watch the repository all time to avoid modifications by other
people. So that, i'm using a win service in wich i implement a file watcher.

I have two basic questions:

1) I'm implementig methods to restore the information in the bd if someome delete, rename or move a file in my repository. The problem i have is that the file watcher
throws more than one event for example if someone moves a file. So, how

can
i know which other events are waiting in the queue (and eventually how can i
acces and navigate to this queue) or is there another way to restore the
changes made to any file on my repository ??

2) My app also can modify the files in the repository, so, i don't want
in these case the file watcher perform the restore actions !! how can i

differ
the changes made by my app or somebody else ?? is there any way to ask

if my
app is running or something like that ??

Any suggestions are welcome !!

regards !!

Marcelo López
Inforcorp. Uruguay. Latin America.


Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ron Vecchi | last post by:
Hi all, Can someone point me in the direction on this one, resources or examples. I am writing a Windows Service to monitor a folder. When I file is modified within the folder or any subfolders...
4
by: Marcelo López | last post by:
Hi all. I'm developing a Windows Explorer like app. I have my own repository to store the files and a bd where i keep the path to each file. I have to watch the repository all time to avoid...
2
by: Jack David | last post by:
Using the code below I am able to monitor a single directory for a new file and then kick-off a process to deal with the file. The question is??? How would I modify this code to be able to monitor...
1
by: Stuart Ferguson | last post by:
I am currently writing a Windows service which monitors multiple folders and processes the files in them accordingly. The folders to be monitored are stored in a string array. I can think of 2...
2
by: Marcelo López | last post by:
Hi all. I'm developing a Windows Explorer like app. I have my own repository to store the files and a bd where i keep the path to each file. I have to watch the repository all time to avoid...
2
by: Guy_B | last post by:
Hi I am using the filesystem watcher to pick up files as they are dropped into a folder - the files are output file from another system and I have no control over that. When 'watcher raises the...
2
by: TwistedPair | last post by:
All, This is sort of a continuation of a previous post of mine. The code below basically reads a registry key to get a path to a folder and it watches for files created in that folder (only...
1
by: =?Utf-8?B?QXZp?= | last post by:
Hi I have an interesting issue, I hope someone can shead light on: I have a 2 server "web farm" with a web app that produces image files. To ensure synchronization of content on both machines,...
6
by: Andy B | last post by:
What would i use to look for changes in a file every minute?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.