I have written an application in VB 6.0. The program will look for a specific
file in an input directory every 5 minutes. Whenever the program sees the
input file in the input directory, process the file.

Input directory is stored in the variable strIPdir
Input file is strIPfile
Input File name is “test.txt”

I have the code like this

strFileDir = Dir(strIPdir & "test.txt")

If strFileDir <> "" Then
‘goto the procedure to process the file
Call FileProcess(strIPdir, strFileDir)
End if

The size of the file will be between 100 M.B to 130 M.B. Sometimes the size
is more than 130 MB.
In my program I have a timer and every 5 mts the program scans for the input
file. Everything is working fine but sometimes there is a problem. The file
“test.txt” is copied to the input directory from some other location using
some script(not VB). The people in other dept are doing this. When the counter
for the timer is 0 mts and 0 seconds and if the file is in the input dir,
everything works fine, but sometimes when the counter is as 0 mts and 0 seconds
and at the same time the other script is trying to copy the file to the I/p
dir. The program sees the name “test.txt” and starts to process the file
but the copying has not been completed and causes the error.
All I want to do is to pause the program for a minute or 2 before processing
the file, so that the other script could finish the copying. How do I do
this? Please help.
Thanks,
Sinni.