Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FTP from FP 2.6 DOS
Message
 
To
24/09/1999 16:25:34
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00268367
Message ID:
00269626
Views:
20
>>Does anyone know of a MS-DOS FTP product that I can use to FTP an ascii file created by a FP Dos program to a Unix computer.
>>
>>Many Thanks
>
>You can use the regular DOS FTP that comes with Windows. You should find ftp.exe in your C:\Windows directory. This FTP allows scripting, which is basically a text file which contains all the FTP commands you want to do. To see all the possible commands, open up a DOS window, type "ftp", then type "help" at the ftp> prompt.
>
>The following is an example tailored for your situation (put an ascii file on a UNIX server):
>
>Function FTP
>Parameter Filename, FTPSite, Username, Password
>
>CRLF = Chr(13)+Chr(10)
>nFile = FCreate("ftp.txt")
>
>* Open connection to FTP Site and log in
>=FWrite(nFile, "open "+FTPSite+CRLF+Username+CRLF+Password+CRLF)
>
>* Force lowercase transmition since UNIX usually looks for lower case.
>=FWrite(nFile, "glob off"+CRLF)
>
>* Force ASCII transmition so the DOS=>UNIX ascii conversion occurs
>=FWrite(nFile, "ascii"+CRLF)
>
>* Put the file on the FTP Site
>=FWrite(nFile, "put "+Filename+CRLF)
>
>* End the connection and close FTP
>=FWrite(nFile, "quit"+CRLF)
>
>* Close the script file
>=FClose(nFile)
>
>* Change current drive in DOS
>cFTPCmd = sys(5)
>! &cFTPCmd
>
>* Invoke the DOS FTP program with the scripting option
>! ftp -s:ftp.txt
>
Your example relies on a DOS window or session, the particular computer this has to run on is only a MS-DOS computer. The question is where do I get the FTP program and then how does it run.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform