Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 12th, 2005, 11:37 AM
Authorized User
 
Join Date: Dec 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default FileSystemWatcher? [C#]

Hi,

I have used a filesystemwatcher class in order to monitor a specific folder.Every thing is working fine.The problem i am facing is
"when a Bulk copy is made to the folder monitored,I need to to know when the Copy is over", so that i can take some actions on newly copied files/folder.

for ex:

if "C:\Myfolder" is the folder monitored and if i add 10000 files into it.it takes some time for copy.i can't take any action on the directory when the copy is in action since i may miss out some files that has to be copied.


The bottom line is "I have to get an acknowledgement for the copy completion for the folder monitored".

Answers with code[c#]or[vb.net] are appreciable.

Thanks in advance.:)

Mn Karthik
__________________
Mn Karthik
 
Old May 12th, 2005, 03:46 PM
Registered User
 
Join Date: May 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Filesystem watcher tell you the current file that was just added.

One possible way to manage this is create a thread which delays x number of secs / mins after a file(s) were added. Every time a file is added it resets the threads sleep.

Down falls of this is if files are constantly being added and no work can be done.

 
Old May 13th, 2005, 03:50 AM
Authorized User
 
Join Date: Dec 2003
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i can't apply delay.
I just need to know when copy is over to the folder monitored so that action can be taken on those files later on.

Any better advice is appreciable along with code.

cheers.

Mn Karthik





Similar Threads
Thread Thread Starter Forum Replies Last Post
Using the FileSystemWatcher Control Eyob_the_pro C# 0 January 4th, 2007 03:08 AM
FileSystemWatcher brawny4 Visual Basic 2005 Basics 3 December 28th, 2006 12:47 PM
HELP - FileSystemWatcher Problems [email protected] Pro VB.NET 2002/2003 0 January 10th, 2005 09:37 PM
FileSystemWatcher Problem [email protected] VB.NET 0 December 18th, 2004 11:29 AM
FileSystemWatcher Class bwood415 General .NET 5 December 6th, 2004 04:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.