TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Frank Galavan
NA
9
14.7k
Testing if a file is complete
Jul 16 2010 8:00 AM
I am kinda new to C#, so please bear with me.
What is the easiest way to test if a file is complete?
Let me explain. A company outside is sending us text files throughout the day. They can range is size from several thousand bytes to almost 250 megs. My program runs from a Scheduled Task throughout the day. The short files are usually no problem, but the big ones can be and often are still in the process of being transmitted into the directory from outside.
The way I have been testing this is to try and rename the file. If I get an exception, I know its still writing. Is there an easier way to test that a file is complete?
Thanks
Frank
Reply
Answers (
2
)
DataTable compute function on non standard datatypes
How to read this data from Notepad file and save it to sql server table .