
Need Help with VBS program timing problem. (Windows 2000)
I have a program process that puts video files in a directory
c:\parkpics\pictures on a one per second basis. I have a VBS program
that on an hourly basis executes a RENAME DIRECTORY followed by a MAKE
DIRECTORY c:\parkpics\MMDDHH so as to have just 3600 files in each
directory. (the new
directories are named MMDDHH for the month/day/hour the RENAME
occurred.)
This is all working pretty well, but about 1 in 20 times, the rename
process fails because the video input process happens to be writing its
once-per-second video file to the c:\parkpics\pictures at the same
instant that the RENAME DIRECTORY command is issued by the VBS program.
Questions:
1) Is there a way for me to test for busy and LOCK the
c:\parkpics\pictures directory, execute the RENAME DIRECTORY in VBS
and
then UNLOCK the directory so the input process cannot interfere with the
rename process? (The input process ignores errors and just "drops a
file
on the floor" if it encounters a busy and this is OK for my
application.)
or
2) Is there something else that I might do to fix this?
Thanks
Joe Mehaffey
--
Got a Question about GPS technology? Looking for a GPS FAQ site?
See: http://www.*-*-*.com/