473,513 Members | 2,275 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Determining if a file has finished arriving

I am writting an application that runs on an FTP server. The purpose of the app is to uncompress gzip files that are sent to the server and then move the file to another folder according to it's contents. The challenge I am having is preventing the application from uncompressing a file before the file has landed on the server in its entirety. Currently, I am using the following statement to check for incoming files

For Each sFile In Directory.GetFiles(g_sWatchFolder
...

This section of code is run every 5 seconds or so. It seems to work most of the time. However, every now and then a file will fail to decompress but will then be decompressed successfully shortly afterwards. I am assuming this is occurring because the application is trying to uncompress the file before it has landed in its entirety. Can anyone suggest a way to programmatically confirm that a file is complete (ie has finished landing). Or, if you can suggest other explinations as to why I am getting decompression errors, I would greatly appreciate hearing them

Cheers
Joe
Nov 20 '05 #1
0 1114

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2963
by: Bernhard | last post by:
I am not sure if php can achieve this, but i guess that my problem shoulb be solved with an server side language. Is there any way i can tell if a visitor of my website has finished a download?...
12
3749
by: Mike MacSween | last post by:
On each workstation there's a front end, when the front end opens it checks a 'version number' held in a table of properties against the version number in a copy of the front end held on the...
5
13685
by: Trowa | last post by:
Hi, I'm trying to use FileSystemWatcher to determine when a new file has been added to a directory. However, after the file has been added, I need to process the file. This results in a...
18
20145
by: Conrad F | last post by:
Hello all, I am waiting for receipt of files in a directory. I use the FileSystemWatcher to detect when files arrive in said folder. I need to read the data from these files ASAP but the files...
3
2912
by: s99999999s2003 | last post by:
hi i need to go into a directory to grab some files and do some processing. The thing is, i need to wait till the process that generates the files in that directory to finish before i can grab...
32
5822
by: Olivier | last post by:
Dear all, I thought the code ----------------------------- pt_fichier_probleme = fopen(nom_fichier, "w"); if(pt_fichier_probleme == NULL){ message_warning_s ("Erreur l'ouverture du...
6
5998
by: elake | last post by:
I found this thread about a pst file in Windows being locked and I am having the same issue. ...
13
10569
by: writeson | last post by:
Hi all, I'm writing some code that monitors a directory for the appearance of files from a workflow. When those files appear I write a command file to a device that tells the device how to...
0
1845
by: Cameron Simpson | last post by:
On 09Jul2008 15:54, Ethan Furman <ethan@stoneleaf.uswrote: If you know that files appear in sequence (a single serial upload process, not multiple uploaders) you can augument this with a check...
0
7265
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7171
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7388
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7547
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7114
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
5098
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3240
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3230
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1607
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.