-1

Is there any way to send files from a local folder to an FTP folder using Progress?

Tom Bascom
  • 13,405
  • 2
  • 27
  • 33
  • You need to post what you've already tried. – Giovanni Di Toro Apr 17 '15 at 19:07
  • i`ve found an exemple on internet using the wininet.dll to connect , but i dont know if its right. [link](http://www.oehive.org/node/456) – Samuel Schneider Apr 17 '15 at 19:14
  • I'd like to know if there's a simple way in progress to connect to a ftp server. – Samuel Schneider Apr 17 '15 at 19:16
  • Have you tried either of the examples that you have found? They should both work. If you have tried them and run into problems then you should show your code along with the resulting errors in your question. – Tom Bascom Apr 19 '15 at 12:26
  • Yeah , Actually it worked fine. But now the people who ask me to do that by using Ftp functions wants to change for webservice. But those examples they are working fine. The problem was in the ftp server, some settings wasn't right. Really appreciate all help! – Samuel Schneider Apr 23 '15 at 18:02

3 Answers3

1

If you're running windows, then WinSCP is a good solution: http://winscp.net/eng/index.php

Tim Kuehn
  • 3,201
  • 1
  • 17
  • 23
0

The "classic" way to do this is to send the commands that you would use if you were doing this manually to the built-in FTP command.

If you know that you want to send a file called "myfile.txt" to the server at 192.168.0.1 you might code:

define variable IPAddr   as character no-undo.
define variable fileName as character no-undo.

IPAddr = "192.168.0.1".
fileName = "myfile.txt".

output through value( "ftp -v -i -A" + IPAddr ).

put unformatted "put " + fileName skip.
put unformatted "bye " skip.
output close.

Obviously you can wrap that into a function and expand it to do more than a simple FTP PUT command (you might need to login...)

FTP is an insecure protocol and a PITA to work with. If you have any influence over such things you really ought to try to use a better protocol. SCP is much easier to use and has much better security.

Tom Bascom
  • 13,405
  • 2
  • 27
  • 33
-1
DEFINE VARIABLE cFtpCommand AS CHARACTER   NO-UNDO.

cFtpCommand = "your FTP COMMAND".

OS-COMMAND SILENT NO-CONSOLE VALUE(cFtpCommand).
Ethaan
  • 11,291
  • 5
  • 35
  • 45