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: Replacement for Invoke Function in 3.0.5.1
photot_tom

From: USA
Posts: 2
Member Since: 04/19/17
posted April 19, 2017 3:39 PM

We are upgrading from v3.0.5.1 to current version of 4.7.3.  We need to configure some parameters when we try to download from our mainframe.

I'm looking for the proper command to replace

  Dim client As New Dart.Ftp.Ftp
  client.SetType(FileType.Ascii)
  client.Invoke(FtpCommand.SiteParameters, "cyl pri=200 sec=20")

I've tried replacing it with

  client.Send("cyl pri=1000 sec=100")

My problem is that the software is downloading the file as a binary file instead of ASCII
Nick B (Admin)

From: Utica, NY USA
Posts: 572
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted April 19, 2017 4:14 PM

Hello,

Transfer type is by default automatically handled by the Ftp class (based upon the file extension), and can be configured on Ftp.Session.AsciiExtensions. To disable this automatic handling, and for information on handling it manually, see Ftp.Session.AsciiExtensions.Enabled:
http://www.dart.com/help/ptftpnet/webframe.html#Dart.Ftp~Dart.Ftp.AsciiExtensions~Enabled.html

Ftp.Send() is the correct replacement for Ftp.Invoke(), though you should be adding "SITE " to the beginning of your client.Send() string to replicate the behavior of your prior Invoke().
photot_tom

From: USA
Posts: 2
Member Since: 04/19/17
posted April 20, 2017 8:48 AM

Thanks. That solved my problems.
Reply | PowerTCP FTP for .NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX