Instead of doing a manual FTP each time it's required, here is a scheduled agent that runs everyday and FTPs a text file to a Notes server at another location that has Unix as the O.S. I have used a batch file which is created in Notes and which actually accesses the destination server & exports the text file there. The batch file and the text file are assumed to reside in the same directory.
'IP address of the destn host
Const gFTPDestnHost$ = "xxx.xxx.xx.x"
'UserID required to log on at the destn
Const gUserID$ = "UserID"
'Password required to log on at the destn
Const gPassword$ = "password"
'Name of the file to be exported.
Const ExportFileName$ = "ExportFile.txt"
'Path where the text file resides
'Const gSourceFilePath$ = "/xx/yy"
'Const gFTPProgram$ = "ftp"
Dim FTPBatchFileNum As Integer
Dim FTPBatchFileName As String
Dim TaskID As Integer
'Creating a batch file that contains all the FTP commands to FTP the "ExportFile.txt" to the destination server whose host name is indicated in the constant gFTPDestnHost$ above
FTPBatchFilenum% = Freefile()
FTPBatchFilename$ = gSourceFilePath$ & "/" &
Open FTBatchFileName$ For Output As
'Writing FTP commands to the batch file
Print #FTPBatchFileNum% "open" & " " &
Print #FTPBatchFileNum% "user" & " " &
gUserID$ & " " & gPassword$
Print #FTPBatchFileNum% "put" & " " &
gSourceFilePath$ & "/" & gExportFileName$
Print #FTPBatchFileNum% "bye"
'Shell command used to execute the FTP commands in the FTPBatchFileName$ created above.
TaskID% = Shell(gFTPProgram$ & " -I -v -n < "
& FTPBatchFileName$ , 6)
This was first published in November 2000