RE: FTP from vfp

Author: Paul Ammoun

Posted: 2002-06-05 at 09:18:02

I use the normal ftp program included in all windows version.

You can take a look via ftp /? In the command prompt for further

details.

This is how I automate it:

** I create a txt file

If File("pierre.txt")

Erase ("pierre.txt")

Endif

p=Fcreate("pierre.txt")

FPUTS(p,"open "+aLLTRIM(PARM1.DEF_SEL_TYP))

FPUTS(p,"user af"+parm1.afnum+" "+parm1.afpass)

FPUTS(p,"CD in ")

FPUTS(p,"put "+mFactfile+" "+SUBSTR(mFactfile,4,12))

FPUTS(p,"CD ..")

FPUTS(p,"CD out")

FPUTS(p,"GET test.TXT G:\S4LIF033.TXT ")

FPUTS(p,"quit")

FCLOSE(p)

**then I run the sendftp.bat

!Sendftp

**sendftp.bat

ftp -n -s:pierre.txt

©2002 Paul Ammoun