C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Code Snippets » File Operations »

File watcher system


Posted Date: 28 Aug 2009    Resource Type: Code Snippets    Category: File Operations
Author: Guru Prasad Reddy.TMember Level: Silver    
Rating: 1 out of 5Points: 3



Hi,

In real time scenario sometimes we need to watch into folder whether file is created or not.
Below is the code snippet to watch the folder for particular actions.


WaitForChangedResult status = fsw.WaitForChanged(WatcherChangeTypes.Created, 10000);

if (status.TimedOut)
{
MessageBox.Show("File is not created");
}
else
{
MessageBox.Show("File is created");
}



Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
File watcher  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Read CSV file and store in DATASET
Previous Resource: Give the filesystem rights
Return to Discussion Resource Index
Post New Resource
Category: File Operations


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use