Skip to main content

I'm trying to use the FTP commands in a script and nothing is happening.  Every command reports successful completion but no transfer takes place.  I tried setting the script to log in to a nonexistent machine with a nonexistent user and a nonexistent password and it reported successful login.  FTPSetDisplayOutput 1 has no effect, nothing displays.

The system I am trying to access using Rumba FTP I can successfully FTP into and transfer files to and from using the Windows built in ftp commands.

Are the commands FTPConnect, FTPChangeDire, FTPDirToFile, and FTPSend supposed to work in Rumba Desktop 8.1.0 SP0 Patch0?  

The full script I am attempting to use (with names of internal systems altered) is:

Sub Main
Dim UserName As String 
Dim UserPassword As String

ChDrive "C"

ChDir "\\Mydir"
MsgBox CurDir()

MsgAsk "UserName",UserName, 10
MsgAskPassword "Password",UserPassword, 8

FTPSetDisplayOutput 1
FTPConnect "ourserver",UserName,UserPassword
MsgBox NM_ResultCode
If NM_ResultCode <> 0 Then
MsgBox NM_ResultText
Else
Print "Logged in, changing directory"
FTPChangeDir "//1234.ABCDE.FGHI.JKL"
If NM_ResultCode <> 0 Then
MsgBox NM_ResultText
Else
FTPDirToFile "","DIR1.TXT"
Print "Directory changed, sending file"
FTPSend "mystuff","mystuff.txt","ASCII","REPLACE"
If NM_ResultCode <> 0 Then
MsgBox NM_Result_Text
Else
Print "File Sent"
End If
End If
End If
FTPDisconnect
End Sub


#Rumba

I'm trying to use the FTP commands in a script and nothing is happening.  Every command reports successful completion but no transfer takes place.  I tried setting the script to log in to a nonexistent machine with a nonexistent user and a nonexistent password and it reported successful login.  FTPSetDisplayOutput 1 has no effect, nothing displays.

The system I am trying to access using Rumba FTP I can successfully FTP into and transfer files to and from using the Windows built in ftp commands.

Are the commands FTPConnect, FTPChangeDire, FTPDirToFile, and FTPSend supposed to work in Rumba Desktop 8.1.0 SP0 Patch0?  

The full script I am attempting to use (with names of internal systems altered) is:

Sub Main
Dim UserName As String 
Dim UserPassword As String

ChDrive "C"

ChDir "\\Mydir"
MsgBox CurDir()

MsgAsk "UserName",UserName, 10
MsgAskPassword "Password",UserPassword, 8

FTPSetDisplayOutput 1
FTPConnect "ourserver",UserName,UserPassword
MsgBox NM_ResultCode
If NM_ResultCode <> 0 Then
MsgBox NM_ResultText
Else
Print "Logged in, changing directory"
FTPChangeDir "//1234.ABCDE.FGHI.JKL"
If NM_ResultCode <> 0 Then
MsgBox NM_ResultText
Else
FTPDirToFile "","DIR1.TXT"
Print "Directory changed, sending file"
FTPSend "mystuff","mystuff.txt","ASCII","REPLACE"
If NM_ResultCode <> 0 Then
MsgBox NM_Result_Text
Else
Print "File Sent"
End If
End If
End If
FTPDisconnect
End Sub


#Rumba

Hi John,

Which version of RUMBA FTP Client are you using? I have 4.5 installed and the FTPxxxxxx Rumba script commands don't work for me.

However, if I create an FTP object I can successfully transfer a file.

Here is my test code (tested as RUMBA Script and Excel VBA macro)

Sub Main()

   Dim myFtpApp As Object

   Dim myFtpSession As Object

   Dim rc As Integer

   Dim strReply As String

   On Error GoTo HandleError

   Set myFtpApp = CreateObject("FTPSFtp.Application")

   Set myFtpSession = myFtpApp.NewSession

   myFtpSession.Hostname = "MyVTHost"

   myFtpSession.UserName = "me"

   myFtpSession.Password = "myPass"

   myFtpSession.TransferType = "ASCII"

   rc = myFtpSession.Connect

   If (nRC <> 0) Then

           MsgBox ("Connection Failed, aborting")

           Exit Sub

       End If

   rc = myFtpSession.SendFile("C:\\TEMP\\testfile.txt", "testfile.txt")

   If (rc <> 0) Then

           MsgBox ("SendFile failed to upload the file")

   End If

   myFtpApp.CloseAllSessions

   myFtpApp.Quit

   Exit Sub

HandleError:

   MsgBox myFtpSession.Error

End Sub

If you need further assistance with using the FTP Object you should check the help included with the Rumba FTP client and contact Supportline if you detailed assistance.

Tom 


I'm trying to use the FTP commands in a script and nothing is happening.  Every command reports successful completion but no transfer takes place.  I tried setting the script to log in to a nonexistent machine with a nonexistent user and a nonexistent password and it reported successful login.  FTPSetDisplayOutput 1 has no effect, nothing displays.

The system I am trying to access using Rumba FTP I can successfully FTP into and transfer files to and from using the Windows built in ftp commands.

Are the commands FTPConnect, FTPChangeDire, FTPDirToFile, and FTPSend supposed to work in Rumba Desktop 8.1.0 SP0 Patch0?  

The full script I am attempting to use (with names of internal systems altered) is:

Sub Main
Dim UserName As String 
Dim UserPassword As String

ChDrive "C"

ChDir "\\Mydir"
MsgBox CurDir()

MsgAsk "UserName",UserName, 10
MsgAskPassword "Password",UserPassword, 8

FTPSetDisplayOutput 1
FTPConnect "ourserver",UserName,UserPassword
MsgBox NM_ResultCode
If NM_ResultCode <> 0 Then
MsgBox NM_ResultText
Else
Print "Logged in, changing directory"
FTPChangeDir "//1234.ABCDE.FGHI.JKL"
If NM_ResultCode <> 0 Then
MsgBox NM_ResultText
Else
FTPDirToFile "","DIR1.TXT"
Print "Directory changed, sending file"
FTPSend "mystuff","mystuff.txt","ASCII","REPLACE"
If NM_ResultCode <> 0 Then
MsgBox NM_Result_Text
Else
Print "File Sent"
End If
End If
End If
FTPDisconnect
End Sub


#Rumba

Thank you very much.  That is exactly the information I needed.