473,405 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Check out files in directory

Hi,

Users send files via FTP in a specific directory on our server.
I need to create a program that checks out the arrival of a file (24/24,
7/7...) in the directory and then that performs some manipulations with this
file.
But, i need the file to be completely transfered before manipulating it.
What is the best way to wait the transfer to be completed ?

Thanks.
Nov 17 '05 #1
4 1966
We create a second control file on the FTP directory once the first
file is completely transferred.

Nov 17 '05 #2
I'm no expert on FTP, but probably the simplest way is to check to see if
the filesize remains steady for a certain time period before concluding that
it's complete.
This is not foolproof however.
Alternatively, IF you can count on users sending a checksum file (or
something similar) along with the actual file, then you can use that to
verify that the file is complete.

"Steph" <no_spam@no_spam.org> wrote in message
news:eH**************@TK2MSFTNGP09.phx.gbl...
Hi,

Users send files via FTP in a specific directory on our server.
I need to create a program that checks out the arrival of a file (24/24,
7/7...) in the directory and then that performs some manipulations with this file.
But, i need the file to be completely transfered before manipulating it.
What is the best way to wait the transfer to be completed ?

Thanks.

Nov 17 '05 #3
Thanks, but i don't understand, what do you mean by "create a second control
file on the FTP directory" ? How do you do that ?
Nov 17 '05 #4
For example, mydata.dat is the file being transferred. You need to know
when that file has been completely transferred so you can start
manipulating it. One mydata.dat has been transferred then have the
sending process send a mydata.dat.control file. Your application can
then just wait for *.control files to arrive.

This is of course making the assumption that you have some control over
the sending side of things?

You could put a checksum (and/or expected file size) in the control
file as mentioned on the other post - but it's a redundant as FTP
should be checksummed anyway.

Nov 17 '05 #5

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

Similar topics

18
by: Dino | last post by:
dear all, i've created an application for a customer where the customer can upload ..csv-files into a specified ftp-directory. on the server, a php-script, triggered by a cronjob, reads all the...
2
by: David Fickbohm | last post by:
People, I am trying to determine the creation date of files in a folder. I am using the following code to find the folder and confirm that files exist in the folder. If someone could give me an...
2
by: David | last post by:
I'm using following code for checking a file existence. I's working fine for given folder. Is there a way to check a file exitance in subfolders? Thanks in advance, David Option Compare...
0
by: Terry | last post by:
Hi All, I'm having trouble checking in new webform or any type of file into ASP.NET web project's root directory. After I added new file into local SourceSafe controlled project, everytime I...
1
by: Pgar | last post by:
I have a page that I have the users uploading files from their local machines. I take these files strip off their path and redirect it to a new file on the web server. I have a virtual directory...
6
by: Dino Buljubasic | last post by:
My application creates some temporary files that are deleted when my application terminates. However, if a temp file is open, it will not be deleted and application will crash. How can I...
6
by: Fred W. | last post by:
When my application starts I need to check folder permissions to ensure they have "Full Control" before I let them proceed on. How can I check this permission. Thank you, Fred
2
by: Paul Lemke | last post by:
Hello, I currently have an application that uses authenticates users via NTLM. I would like to provide a user a directory listing of a folder. Everyone has read access to the folder, but the only...
4
by: giftson.john | last post by:
Hi, I am creating an application which migrates all documents from one repository to another repository. Before migration i have to verify all the documents are unique. No duplicates has to be...
3
by: tshad | last post by:
Is there some way to have the fileWatcher to initially check the folder to see if there is anything in it (based on the filters)? If I reboot the machine, for example, and it starts up the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.