OK, I think I have a solution for your problem.
You say you check for existing files every 1 second. I say
reduce this down to every 3 - 4 seconds. You are probably
trying to access it as it is bing created. I would turn
on error catching and just loop the file move command
until the err.num value is 0.
Do you understand this? If not copy your snippet of code
that moves the file and I will modify it for you.
Daniel W
using your vb6 app.
>-----Original Message-----
>Don't be fooled by the subject, this is not your typical
>security permissions problem.
>
>Scenario, client applications generate a text file that
is
>copied to a network share on Win2k server. A VB6 app
>using a timer control monitors this directory every one
>second looking for files. When it finds files, the first
>thing it does is copied the file to another directory for
>backup purposes. This is where the error is, permission
>denied when using the
Scripting.FileSystemObject.File.Copy
>method. Security permissions are fine, don't need to go
>there.
>
>Once the app crashes, then is restarted it processes the
>same file it errored out on w/o any problem.
>
>It seems that something still has a lock on the file when
>the app tries to copy the file to the backup folder.
>
>Does anyone have any idea why a lock would/could stay on
a
>text file for a prolonged period of time?
>
>Thanks in advance.
>.
>
|