Hi,
Well if you program itself copy the file you can rise an event when the file
is copied completely.
Other than that, I do not think you have a way.
A dirty solution could be trying to open the file for write, as it's open by
another process you should get an exception, you put this in a timer and you
are done.
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Kenneth H. Brannigan" <Ke***************@discussions.microsoft.com> wrote
in message news:A2**********************************@microsof t.com...
Hello,
Any suggestions on a work around? Is there something beside the
fileSystemWatcher that should be utilized. Anyway to determine when the
file
is finished with the copy process?
Thanks,
Ken
"Ignacio Machin ( .NET/ C# MVP )" wrote:
Hi,
"Kenneth H. Brannigan" <Kenneth H. Br*******@discussions.microsoft.com>
wrote in message
news:8C**********************************@microsof t.com... > Hello,
> I have a FileSystemWatcher looking at a particular directory. When I
> copy
> a
> large file (750 MB) to this directory I receive multiple Change events.
> I
> am
> fine with this but when I call File.GetLastWriteTime in the Change
> event
> it
> returns the current date and time not the date and time windows
> explorer
> shows as Last Write Time. If the file is small everything works fine.
> Is
> there a way to fix this issue?
The FilesystemWatcher is far from be an exact science. Probably you get
that time cause the file still is being changed (or open to write).
Unfortunately there is no CloseFile event, so you dont know when the
file
was closed.
If the file is small probably what is happening is that the file is
closed
already by the time you handle the LastWrite event.
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation