Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 298
  • Last Modified:

FTP creates 0 byte file

Hi ya,
     We are having an intermittent problem with FTP.  At times while retrieving files from the FTP server, a 0 byte file is created.  WHY?

We use Windows 2000 server and client. Is this a problem with FTP server or configuration?

Thanks!
0
jmnason
Asked:
jmnason
1 Solution
 
PNJCommented:
How are you determining whether there's a file ready to pick up? I had this once because I was doing a DIR$ with "*.DAT". The FTP program drops the (eg) FILE.DAT into the directory and CREATES the file first. It then transfers data into that file before closing it. Windows only see the number of bytes in the file when the FTP transfer has finished and the file is CLOSED. Thus, you can DIR$("*.DAT") and see the file, but if you pick it up before the transfer is finished it'll be empty. What we did was to get the FTP transfer to FTP over "*.X" and then do an FTP rename command to "*.DAT" after the transfer was done.

Alternatively you can simply ignore 0 byte files and then pick 'em up again next loop.

Pete
0
 
GivenRandyCommented:
I usually find these kinds of files when the source file is not specified completely. For example, you may CD to a directory and then send that file:

put filename

However, the source file may not be there correctly. Better to use the whole path:

put some-directory\another-directory\filename
0
 
jmnasonAuthor Commented:
We have found the problem and it appears to be in TCP/IP making a connection. Please click the link http://www.experts-exchange.com/Networking/WinNT_Networking/Q_20566719.html for further details and let us know.

Thanks all.
0
 
CleanupPingCommented:
Hi jmnason,
This old question (QID 20566453) needs to be finalized -- accept an answer, split points, or get a refund.  Please see http://www.cityofangels.com/Experts/Closing.htm for information and options.
0
 
GPrentice00Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

 -->PAQ - with points refunded

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER

GPrentice00
Cleanup Volunteer
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now