I would like to create an application that would, after manipulating a text file, log on to a private FTP site and PUT that text file onto the server, and then logout.

I have the code to manipulate my text file and make it ready for sending and I have read that in VB documentation about the Internet transfer protocol. I wonder where in the code I need to declare the required settings like :

[Inet1.Proxy = "XXX.XXX.X.XX"
Inet1.AccessType = icNamedProxy]

and if this would work or not?

[With Inet1
.URL = ""
.UserName = "XXXXXXX"
.Password = "XXXXXXX"
.Execute , "PUT", "TEXTFILE.TXT"
.Execute ,"CLOSE" ' Close the connection.
End With]

Thanks for your precious help.

Dani AI

Generated

If the goal is simply "make a file, PUT it to an FTP server, then disconnect," there are two practical routes depending on which VB you use and whether you need secure transfers.

For : with the VB6 Internet Transfer (Inet) control you must configure network settings (proxy/access type, server URL and credentials) before initiating the transfer, and you must wait for the control to report the transfer as complete before releasing resources. Common pitfalls are starting the upload while the local file is still locked, not handling asynchronous completion, or closing the control too soon — those cause partial uploads or errors.

Checklist / quick troubleshooting

  • Verify credentials and the exact remote path by testing with a standalone FTP client (FileZilla or command-line FTP).
  • Confirm firewall/proxy allows outbound FTP (port 21) and that passive vs active mode matches the server; switch to passive if transfers stall.
  • Use binary mode for non-text files; use ASCII only for plain text when you know the server expects it.
  • If transfers intermittently fail, add retry logic and explicit close/dispose of any streams or control objects.

When to switch technologies

  • If using VB.NET, prefer System.Net classes (WebClient.UploadFile or FtpWebRequest) for clearer synchronous/asynchronous APIs and better error handling. FtpWebRequest also supports FTPS (EnableSsl) for TLS; SFTP (SSH) is not supported and requires a third-party library.
  • For SFTP, use a maintained library such as the WinSCP .NET assembly or SSH.NET.

References

Thanks to for the attached sample — it’s useful as a starting point. Ensure any example you adopt adds error handling, respects completion events, and adapts passive/binary settings to the remote server.

please use attached code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.