By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,470 Members | 924 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,470 IT Pros & Developers. It's quick & easy.

Does the file REALLY exist

P: n/a
I'm looking at a directory into which files will be copied asyncronously by a
user. If a file takes some time to copy, it is possible to detect the file
before the copy has finished. If I try to process the file, an exception is
thrown. How can I determine if the file is REALLY there and ready to be
processed?

Thanks in advance,
Tom Costanza MCP
Mar 24 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Attempt to open the file with a lock for exclusive access.

If the file copy has not yet finished then your operation will throw an
exception.
"Tom Costanza" <ma*****@hotmail.com> wrote in message
news:BA**********************************@microsof t.com...
I'm looking at a directory into which files will be copied asyncronously
by a
user. If a file takes some time to copy, it is possible to detect the
file
before the copy has finished. If I try to process the file, an exception
is
thrown. How can I determine if the file is REALLY there and ready to be
processed?

Thanks in advance,
Tom Costanza MCP

Mar 24 '06 #2

P: n/a
Hi!

I always try first to rename the file.

Wolfgang

"Tom Costanza" <ma*****@hotmail.com> schrieb im Newsbeitrag
news:BA**********************************@microsof t.com...
I'm looking at a directory into which files will be copied asyncronously
by a
user. If a file takes some time to copy, it is possible to detect the
file
before the copy has finished. If I try to process the file, an exception
is
thrown. How can I determine if the file is REALLY there and ready to be
processed?

Thanks in advance,
Tom Costanza MCP

Mar 24 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.