[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: my problem



Mike,

Here's one approach for FTPing a file using SQR:

begin-procedure ftp_file
  let $ftpbatch = '\\path\mybatchfile'
  let $ftpcommand = 'ftp -n -s:' || $ftpbatch
  CALL system USING $ftpcommand #status

       If #status <> 0
          Show 'Unsuccessful call to execute ftp, #status=' #status
          Let $Error_Msg = 'Unable to execute ftp'
          Let #Ret_Cd=#status
       End-If
end-procedure

The file named "mybatchfile" is just a text file that
looks something like this:

  open myserver
  user scott
  tiger
  cd myremotedir
  lcd c:\mylocaldir
  put myfile.txt
  bye

Regards,
Lauri Macha



At 03:02 PM 1/3/01 -0500, you wrote:
I was wondering if it was possible to open an FTP session and PUT a
>file onto an FTP server
> through SQR?  Has anyone done this/seen this done?  Have the code
> required?  Thanks.