I apologize in advance if this is a wrong part of the forum, but in others it seemed even less relevant.
So, I'm trying to make a FOXPRO program to send some files from an FTP server (if you're going to say there's a FOXPRO forum here - the problem I have is not on FOXPRO's part at all). Since FOXPRO itself doesn't have commands for that, I form a text file with commands like
, then run an external command "ftp -s:scriptname", and all's dandy. But what if something goes wrong? For example, there's no connection, or the file is missing. In the manual mode, it becomes evident immediately, but the batch command continues to run void, goes back to the calling program, and that one thinks everything went right. The question is, while studying online help on 'ftp' command, I couldn't find any hint that the command returns some error codes or has internal 'if-then' type subcommands. Is there *any* way to make a program calling 'ftp' with a batch script aware of possible failures?
Thanks.
So, I'm trying to make a FOXPRO program to send some files from an FTP server (if you're going to say there's a FOXPRO forum here - the problem I have is not on FOXPRO's part at all). Since FOXPRO itself doesn't have commands for that, I form a text file with commands like
Code:
open (ftp-address)
(username)
(password)
get (filename)
close
bye
Thanks.