MMCC MASTHEAD
Mid-Michigan Computer Consultants - Bay City, Michigan
 


CONTENTS       (old style)
Mid-Michigan Computer Consultants
509 Center
Bay City, Michigan

Sales (989) 892-9242
Support (989) 686-8860

Plb-F110.cfm v1.0
 

ANSI Standard PL/B Language and Visual PL/B

FTP from PL/B

FTP Processing from PL/B

We need the ability to process files via FTP from our PL/B programs. The suggestion from the Sunbelt forum was to use the FTP.exe

Here's an example posted by Mike Maynard in May 2010.

John Shrimski offered this link for more information: FTP Command List
FTP Example: Works on Windows XP, Vista, and Win7 and transfers an ASCII text file to the FTP host with the hash option to give a visual cue to the transfer progress. Logs to Logfile.log
:START
@Echo FTP send filename.OUT to FTP Server at ftp.host.com >> Logfile.log 
ftp -n -s:"ftpscript.ftp" ftp.host.com | FIND "Transfer complete" >> Logfile.log
if ERRORLEVEL 1 goto :FTPError
@Echo "ftpscript.ftp completed successfully" >> Logfile.log
GOTO :EXIT

:FTPError
@Echo "ftpscript.ftp failed" >> Logfile.log

:EXIT
EXIT
Script file: ftpscript.ftp
user USERID
Password-for-USERID
hash
ascii
prompt Y
cd /Directory_to_receive_file
put filename.OUT
close
quit 



v1.10

Write to MMCC Technical Support at:               Send e-mail to MMCC.
MMCC - Technical Support
600 W. Midland
Bay City, MI 48708
(989) 686-8860
© 1997 - 2010 MMCC - All Rights Reserved