Our Products:
CompleteFTP
edtFTPnet/Free
edtFTPnet/PRO
edtFTPj/Free
edtFTPj/PRO
Login
Remember
Google Login
Register
All Activity
Questions
Hot!
Unanswered
Tags
Categories
Ask a Question
Ask a Question
Concurrency Issue
0
votes
4.2k
views
asked
Nov 11, 2010
in
.NET FTP
by
quimbo
(
1.1k
points)
I have a SFTP server that clients connect to and upload files. (small files 1300 to 10000 bytes)
I have a process that connects to the server and moves the files.
I get a list of files:
filesToLoad = sFTP.GetFileInfos(resultFolder & "\*.hl7")
Occasionally the second process moves a file while it is still being uploaded and I end up moving 0 bytes.
Is there anyway in the edtFTPnet/PRO library to know that a file is still being uploaded?
Thank you.
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
3
Answers
0
votes
answered
Nov 12, 2010
by
support2
(
162k
points)
The client can't easily detect this (unless you know how large the files are, and you get the size before downloading).
The best solution is for the uploading clients to upload to a temp file, and then to do a rename at the end of the upload. If you filter out temp files in your listing then you'll only get files that are completely uploaded.
Please
log in
or
register
to add a comment.
0
votes
answered
Nov 15, 2010
by
quimbo
(
1.1k
points)
Thank you. I have control over about 65 percent of the client connections. I will update that application to do the rename scenario you outlined
Please
log in
or
register
to add a comment.
0
votes
answered
Nov 15, 2010
by
support2
(
162k
points)
Another option is to get the size before downloading, wait say 5 sec, and then get the size again. If the size is identical, you can assume that it still isn't being written to. This should work 99% of the time.
Please
log in
or
register
to add a comment.
Categories
All categories
Products
(2.8k)
CompleteFTP
(418)
Java FTP
(1k)
.NET FTP
(1.4k)
FAQ
(120)
General
(178)
Feature Requests
(21)
...