|
by: Balu |
last post by:
Hi,
I am using the FileSystemWatcher object to watch for a
specific file being created in a directory (with a
timeout):
fileWatcherResult = fileWatcher.WaitForChanged
(WatcherChangeTypes.Created, 180000);
After the file is crated I try to open it.
|
by: Erik Herje via .NET 247 |
last post by:
Hi,
I have a Windows Service written in C# whos purpose is to sniff a folder to look for changes in the folder. If a file is created or changed, it should get its name and start an object the sends the file to another server.
The problem I have is that when for example a txt file gets edited and saved with notepad, OnChanged gets executed twice (the test file was a tiny txt file).
I connected to the process with the VS.Net debugger and...
|
by: Matthew Wieder |
last post by:
The documentation specifies that the WaitForChanged method should not be
called on the UI thread or it will freeze the UI thread. So, I have
started it in a thread seperate from the main form's thread. The
WaitForChanged event will wait infinitely until a file is created, but
the user needs to be able to stop the application from running and so I
need to stop that thread waiting for the file. I have hookde up a
ManualResetEvent to the...
|
by: John Lee |
last post by:
Hi,
I wrote a small program that copy a list of files to a specified folder one
by one, i.e. this app will copy one file into the specified folder and wait
until it's consumed (deleted) then copy another one in. Here is what my
code:
// other codes to get a list of files
while (morefiles)
{
|
by: Krish |
last post by:
Hello Gurus,
Pardon me for asking dumb question...
I wrote small csharp program to watch a folder for any created text file...
When i try to run through debugger and stop after "
watcher.EnableRaisingEvents = true;", i manually drag and drop windows text
file and this program doesnt seem to fire up... see code below and pl.
advise what wrong iam doing. Thanks.
|
|
by: J-T |
last post by:
We are working on an asp.net application which is a 3-tier application.I was
aksed to create a component which monitors a folder and gets the file and
pass them to a class library in our business logic layer(so far so good and
easy).I initialize my class which is using a FileSystemWatcher in my
Global.asax and everything works fine.I have found FileSystemWatcher class
not very reliable and sometimes it behavies unexpectedly.I'm afriad that...
|
by: Kai Thorsrud |
last post by:
Hi i'm an event Noob and i'm calling a class from my main module console app
like this. I'm sorry if this is a lot of code to read but i can't see the
error according to my book.
Thanks a LOT.
if there are other noobs here like me feel free to use my code if it's of
any use :)
I've set a breakpoint at doWorkOnChangedFile but notinh happens... i'm
flooding my log like hell.
|
by: Abel Chan |
last post by:
Hi there,
I was trying to write a simple NT services using .NET 2.0 and
fileSystemWatcher control. The goal is to poll documents from a watch
directory and ftp them to a remote web site.
I created a Windows Services project using VS2005. Drag a fileSystemWatcher
control to the designer and added the following code. Here is what I found
out when I create a new file under the watch directory:
1) Using notepad - OnCreate event...
|
by: =?Utf-8?B?Sm9obiBT?= |
last post by:
I am trying to find out if there is a way to tell if there is already a
filesystemwatcher (created by a webservice) monitoring a folder.
I have a webservice that creates a filesystemwatcher, monitors a folder and
then returns the contents of the new/changed files. However, if the client
app loses connection to the webservice without closing the filewatcher, and
then reconnects (and thus creates a new watcher), I believe I end up with...
|
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...
|
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,...
|
|
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...
|
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...
|
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,...
|
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...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|