J
Joe Kimbler
I'm writing a "Hot Directory" software package that watches for an MP3
file to be uploaded to an FTP directory. When the file has completed
uploading, it will be converted into a WAV file and imported into an
automation system.
The problem that I am having is telling if IIS (FTP) is done uploading
the file and it is no longer in use. Currently, the software just
checks the file time. If the time is older than 5 minutes, the
software converts the file. This works great for our staff with
high-speed internet connections. However, if a staff member uploads
an MP3 using a 56k line, it may take longer than 5 minutes to upload.
When the software scans the file and sees it's older than 5 minutes
and starts to convert it, the software crashes.
I've tried using the "LanManServer" object to check if a file is open.
However, going from XP to a Windows 2000 server, it doesn't seem to
work.
I've also tried to use the Try/Catch functions. This almost works.
However, for some reason the last second of each file is clipped when
converted. It almost acts like IIS no longer reports the file in use,
but it hasn't written the last block of the MP3 file yet.
I'm wondering if there is a function or compnent that someone has that
will check if a file is in use either on a local machine, or on
another machine on the LAN.
Thanks.
-Joe Kimbler
file to be uploaded to an FTP directory. When the file has completed
uploading, it will be converted into a WAV file and imported into an
automation system.
The problem that I am having is telling if IIS (FTP) is done uploading
the file and it is no longer in use. Currently, the software just
checks the file time. If the time is older than 5 minutes, the
software converts the file. This works great for our staff with
high-speed internet connections. However, if a staff member uploads
an MP3 using a 56k line, it may take longer than 5 minutes to upload.
When the software scans the file and sees it's older than 5 minutes
and starts to convert it, the software crashes.
I've tried using the "LanManServer" object to check if a file is open.
However, going from XP to a Windows 2000 server, it doesn't seem to
work.
I've also tried to use the Try/Catch functions. This almost works.
However, for some reason the last second of each file is clipped when
converted. It almost acts like IIS no longer reports the file in use,
but it hasn't written the last block of the MP3 file yet.
I'm wondering if there is a function or compnent that someone has that
will check if a file is in use either on a local machine, or on
another machine on the LAN.
Thanks.
-Joe Kimbler