473,669 Members | 2,415 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Monitoring a directory for new files

I would like to develop a C# Windows Service Application
that monitors a directory for new files. When a new file
is detected, then I would like it to run an SQL Job.

Is there a command I can use with C# that would accomplish
this?

Thank you for your help.
Nov 15 '05 #1
2 1458
Take a look at the FileSystemWatch er class.

"Scott" <an*******@disc ussions.microso ft.com> wrote in message
news:0c******** *************** *****@phx.gbl.. .
I would like to develop a C# Windows Service Application
that monitors a directory for new files. When a new file
is detected, then I would like it to run an SQL Job.

Is there a command I can use with C# that would accomplish
this?

Thank you for your help.

Nov 15 '05 #2
I will. Thanks.
-----Original Message-----
Take a look at the FileSystemWatch er class.

"Scott" <an*******@disc ussions.microso ft.com> wrote in messagenews:0c******* *************** ******@phx.gbl. ..
I would like to develop a C# Windows Service Application
that monitors a directory for new files. When a new file is detected, then I would like it to run an SQL Job.

Is there a command I can use with C# that would accomplish this?

Thank you for your help.

.

Nov 15 '05 #3

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

Similar topics

3
4137
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 it should write the name of the file to a xml file. Then at a specifed time all the files in the xml quene will be backed up on a network share. How would I go about monitoring a folder and all subfolders and detect when
0
2088
by: Jeff Reed | last post by:
I am experiencing the the problem outlined the below. Unfortunately, I am using WinXP and I not sure if I can apply the solution due to lack of security control Any feed back would be apreciated http://support.microsoft.com/default.aspx?scid=kb;EN-US;31795 FIX: "Failed to Start Monitoring Directory Changes" Error Message When You Browse to an ASP.NET Pag View products that this article applies to This article was previously...
1
6118
by: Edward Yang | last post by:
I setup web.config with impersonation="true". On our local server the project works great. I did the same procedures on our staging server, but it failed with an impossible error: Server Error in '/' Application. -------------------------------------------------------------------------------- Access denied to 'C:\Inetpub\wwwroot\myapp\default.aspx'. Failed to start monitoring file changes. Description: An unhandled exception occurred...
4
7359
by: kimpton | last post by:
Hi, My App running on my local machine is trying to access apsx and ascx pages via a virtual directory (see earlier post) that points to a share on a different machine. I can now access .aspx and run .aspx pages ok. However I've added a <@ register tag to a local page that references a .ascx page on the remote share (via the virtual directory). I now get a 'Failed to start monitoring changes to ' error on the @register statement.
9
3198
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My questions are below... "David Good" wrote: > We have a network running both Win2k and Win2k3 webservers and our web sites > reside on a UNC network share that happens to be a Network Appliance NAS.
1
1875
by: zdk | last post by:
Now I've critical problem with my system and the limitation of Windows Task Schedule,so I need to code a windows service that can monitoring/watching files in directory if new file or file changed exists this service will automatically FTP to another machine,and if no file&& no changed it still watching when changing/new exists. The question is How to create the program like this as Windows Service? What API name could be used in...
0
952
by: William Sullivan | last post by:
I've got a 2.0 app that is crashing prior to the first page being displayed. I'm getting a "FileNotFoundException" with the message that a module wasn't found. No word on the module that is missing. Using FileMon, I've seen that the worker process is attempting to find the compiled version of the login page (blahblah.aspx.184848484848.compiled), wasn't able to find it anywhere, then looked for and found the webpage...
2
2670
by: Alan Bak | last post by:
HI I am running Active Perl on a Windows XP machine. I am hoping to get some advise on a strategy to monitor and copy files that are arriving in a directory and need to be copied to a second location. Files will arrive at the rate of one every 2 to 4 seconds into a directory immediately below the parent. The number of files written to each directory will vary and the number of directories written will also vary (typically the number of...
0
3460
by: =?Utf-8?B?UmFmYWVsIEFtb3JpbQ==?= | last post by:
Hello Guys, I have an application that is installed on three different data centers across the world (exactly the same environment and installed files for each one). I got some errors from just one data center and this is not making sense to me: Exception: System.Web.HttpException: Failed to create page of type
0
1160
by: mr t | last post by:
Is there anyway to turn off visual studio file monitoring? It is interfering with my web application debugging. here is a problem: sometimes, BUT NOT ALL THE TIMES, when I create a directory using system.io.directory.create , in a web application, when i call system.io.directory.delete(filename, true), an exception is thrown that the directory is not empty. notice that I have added 'true' for recursive delete. when I close visual...
0
8465
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8383
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8894
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8803
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8587
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8658
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6210
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5682
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4384
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.