login about faq

Is this a bug, or just something weird about Windows 2000 SP4?

I am using FTP2 version, ActiveX version, called by FoxPro. It is running on Windows Server 2008 R2 Standard SP1.

When I connect to a Windows 2000 SP4 server in Passive mode, and do GetSizeByName(XYZ.TXT), it fails to find XYZ.txt (lowercase 'txt' extension). It returns a size value of -1. When I connect to Windows 2003, it does not fail to find XYZ.txt. It returns a nonzero size value. The file size in both cases is under 1KB.

GetFile does not care about case; it will get XYZ.TXT or XYZ.txt when told to get XYZ.TXT.

asked Aug 22 '14 at 19:30

KValR's gravatar image


Here's a new build that may resolve the problem:

64-bit: http://www.chilkatsoft.com/download/preRelease/ChilkatAx-9.5.0-x64.zip
32-bit: http://www.chilkatsoft.com/download/preRelease/ChilkatAx-9.5.0-win32.zip

There may be no perfect solution. If the FTP server supports the SIZE command, then Chilkat will use it to retrieve the file size info (as opposed to downloading the entire directory listing over a separate data connection). The problem is that the FTP server will likely be case-sensitive w.r.t. the filename passed in the SIZE command.

If the size information is retrieved by fetching a directory listing, then Chilkat will use a case-insensitive match on the filename. If two files have identical names except for case (which can happen on server-side filesystems that are case-sensitive, such as w/ Linux), then Chilkat will return the exact match first, then the inexact match (using the new build, which will become v9.5.0.44).

If your FTP server has the SIZE command, I think it's possible to avoid it by first making a call that forces the directory listing to be retrieved. You would do this via the GetDirCount method (which is new in this upcoming version. The GetDirCount method will replace the deprecated NumFilesAndDirs property because we don't want a property that behind-the-scenes involves network communications. The GetDirCount will force the directory listing to be retrieved and cached in memory. The GetSizeByName method should then use the cached size info (if available).


answered Aug 25 '14 at 11:41

chilkat's gravatar image

chilkat ♦♦

edited Aug 25 '14 at 11:41

Thank you, I will give that a look. I inherited legacy FoxPro programs and am trying to make them more robust. They use your software, and it seems to work pretty well! Thank you for making and maintaining these utilities.

(Aug 29 '14 at 13:02) KValR
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Aug 22 '14 at 19:30

Seen: 1,205 times

Last updated: Aug 29 '14 at 13:02

powered by OSQA