Login  
Search All Forums
Dart Home | PowerTCP FTP for .NET | Custom Development Reply | PowerTCP FTP for .NET Topics | Forums   
AuthorForum: PowerTCP FTP for .NET
Topic: incorrect filesize
psved

From: austin, TX USA
Posts: 3
Member Since: 07/13/02
posted July 13, 2002 7:31 PM

When I try to download a file from a FTP server using ftp1.BeginGet method, I get the file on my local box, but it has different file size than the one showing on the server.

any ideas why?

thanks
Jon Belanger



From: Rome, NY USA
Posts: 310
Member Since: 06/10/02
posted July 15, 2002 10:32 AM

If you are downloading any file other than an ASCII text file you have to set the .Type property to ftpImage (1). This is a common reason why the file size would be different.

Value
 Constant
 Description
 
0
 ftpAscii
 Data type ASCII. This data type is used to transfer text files between systems (ASCII characters 13 (CR) and 10 (LF) are used as line separators). The sending host must convert the text file from its native format to ASCII and the receiving host must convert it from ASCII to its native format. The ASCII format serves as a neutral format for the data transfer. This is the default value.
 
1
 ftpImage
 Data type IMAGE or BINARY. The IMAGE data type is used to transfer binary files between systems. This type identifies the data as a sequence of contiguous bits packed into 8-bit bytes. The data should be stored as a sequence of bits by each system involved in the transfer.
 
2
 ftpEbcdic
 Data type EBCDIC. The EBCDIC data type transfers EBCDIC text files between systems supporting the EBCDIC character set. If both systems use EBCDIC as the native character set, this data type loses no information during the transfer.
 
3
 ftpZip
 Data type Zip file format, IMAGE or BINARY. The Zip file format will check to see if the data is a valid zip file during a Get or Retrieve operation and decompress the file into the local directory. If the operation is a Put or a Store operation, the file specified will be compressed and stored on the FTP server as a valid Zip file. The Zip data type is not part of the RFC 959 specification and is an extension only used by the FTP control. During a List or NameList operation, the data type is treated as ftpImage.
 
psved

From: austin, TX USA
Posts: 3
Member Since: 07/13/02
posted July 15, 2002 12:31 PM

thanx Jon. Setting the correct fileType value did really fix the problem.
Reply | PowerTCP FTP for .NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX