473,386 Members | 1,715 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,386 software developers and data experts.

Detecting a change in a file or directory

I have several pieces of data that I use the HttpApplicationState for,
because they rarely change and are used by everyone. When these pieces of
data are created, they are created either from several files that rarely
change or are a list of the files in a directory that I rarely add or remove
files from. Therefore, I want to be able to detect when a file is added to,
removed from, or modified in one of these directories. Because I create the
HttpApplicationState in the Global.asax.vb file, I need to do the detecting
in there. However, it does not seem to want to let me create a
System.Io.Directory object in that file. How can I detect when a file or
directory is added, removed, or modified? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
Dec 4 '05 #1
4 3524
file watcher service can tell you when a file changed or not on a NTFS drive

"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:u8***************@TK2MSFTNGP11.phx.gbl...
I have several pieces of data that I use the HttpApplicationState for,
because they rarely change and are used by everyone. When these pieces of
data are created, they are created either from several files that rarely
change or are a list of the files in a directory that I rarely add or
remove files from. Therefore, I want to be able to detect when a file is
added to, removed from, or modified in one of these directories. Because I
create the HttpApplicationState in the Global.asax.vb file, I need to do
the detecting in there. However, it does not seem to want to let me create
a System.Io.Directory object in that file. How can I detect when a file or
directory is added, removed, or modified? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

Dec 4 '05 #2
How do I use that?
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Brian Henry" <no****@nospam.com> wrote in message
news:u6***************@TK2MSFTNGP09.phx.gbl...
file watcher service can tell you when a file changed or not on a NTFS
drive

"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:u8***************@TK2MSFTNGP11.phx.gbl...
I have several pieces of data that I use the HttpApplicationState for,
because they rarely change and are used by everyone. When these pieces of
data are created, they are created either from several files that rarely
change or are a list of the files in a directory that I rarely add or
remove files from. Therefore, I want to be able to detect when a file is
added to, removed from, or modified in one of these directories. Because I
create the HttpApplicationState in the Global.asax.vb file, I need to do
the detecting in there. However, it does not seem to want to let me create
a System.Io.Directory object in that file. How can I detect when a file or
directory is added, removed, or modified? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/


Dec 4 '05 #3
Nathan Sokalski wrote:
How do I use that?


Try this http://www.freevbcode.com/ShowCode.asp?ID=4841
Dec 5 '05 #4
http://www.dotnetspider.com/kb/Article1623.aspx

Crossposting is bad, using google is good :8-)
--
Vadym Stetsyak aka Vadmyst
http://vadmyst.blogspot.com

"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:e7****************@TK2MSFTNGP12.phx.gbl...
How do I use that?
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Brian Henry" <no****@nospam.com> wrote in message
news:u6***************@TK2MSFTNGP09.phx.gbl...
file watcher service can tell you when a file changed or not on a NTFS
drive

"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:u8***************@TK2MSFTNGP11.phx.gbl...
I have several pieces of data that I use the HttpApplicationState for,
because they rarely change and are used by everyone. When these pieces of
data are created, they are created either from several files that rarely
change or are a list of the files in a directory that I rarely add or
remove files from. Therefore, I want to be able to detect when a file is
added to, removed from, or modified in one of these directories. Because
I create the HttpApplicationState in the Global.asax.vb file, I need to
do the detecting in there. However, it does not seem to want to let me
create a System.Io.Directory object in that file. How can I detect when a
file or directory is added, removed, or modified? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/



Dec 5 '05 #5

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

Similar topics

6
by: bissatch | last post by:
Hi, I am about to write an application that will display all pdf files in a folder and display them by file name in order of date. Is there an easy way of doing this? I was thinking about...
5
by: Jole | last post by:
Hi I'm writing a program that needs to read from a file. In order for the program to be robust, it should somehow check that the file isn't corrupt, or stuffed in any way. For example, that...
1
by: jeff | last post by:
Hiya I just woundering how would I go about detecting addition, deletion or change to files in a folder? Ideally id like to look at a linux directory and say watch all its contents and then...
3
by: Nathan Sokalski | last post by:
I have several pieces of data that I use the HttpApplicationState for, because they rarely change and are used by everyone. When these pieces of data are created, they are created either from...
8
by: dagecko | last post by:
Hi I would like to know how to detect if a file is binary or not. It's important for me but I don't know where to start. Ty
7
by: BWill | last post by:
Hi, I'm writing a file browser, but I'm not sure how I could go about detecting the drives available on windows and linux systems (preferably using the standard modules if possible). I guess I...
2
by: runner7 | last post by:
Can anyone tell me if there is a way in PHP to determine when a session times out on the server or how many concurrent sessions there are in your application?
3
by: Chris Mellon | last post by:
This appears to be a change in behavior from Python 2.4 to Python 2.5, which I can't find documented anywhere. It may be windows only, or related to Windows behavior. In 2.4, the current...
1
by: wwwords | last post by:
Is there a general method for detecting that a user has changed the record currently visible on a form, whether this is by hitting PgUp or PgDn or clicking on a navigation button, even if no change...
2
by: hharry | last post by:
Hello All, Does anyone know of a method to automatically detect if a file is corrupted ? Due to a failed backup process a number of files were corrupted. The files are mostly .xls, .doc, .pdf....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.