B
Brian
I am passing a script to ftp.exe (using Shell) to do these actions:
1. Dir the FTP folder, redirecting the Dir output to a text file
I then import the text file into a table and examine the contents to
determine if the correct files are available)
2. Download the files if available
Using the value returned by the API's WaitForSingleObject, I can even
determine whether the FTP connection timed out (either downloading a very
large file, or the process simply hung), and using KillTask, I can kill FTP
if so.
There are two things I cannot tell, however, because they are internal to
ftp.exe.
1. Incorrect FTP server name.
2. Incorrect FTP user name and/or password
Both of these generate FTP return codes. I know I can test this manually,
but I would really like to determine this error at runtime in Access for
diagnostic purposes. As it stands, I have no way of distinguishing between an
incorrect username/password and a Dir that is legitimately empty because
there are no files on the FTP server; both result in normal termination of
FTP and an empty file list.
Is there a way to direct the output of the FTP session into a text file so
that I can examine the contents for potential FTP errors?
1. Dir the FTP folder, redirecting the Dir output to a text file
I then import the text file into a table and examine the contents to
determine if the correct files are available)
2. Download the files if available
Using the value returned by the API's WaitForSingleObject, I can even
determine whether the FTP connection timed out (either downloading a very
large file, or the process simply hung), and using KillTask, I can kill FTP
if so.
There are two things I cannot tell, however, because they are internal to
ftp.exe.
1. Incorrect FTP server name.
2. Incorrect FTP user name and/or password
Both of these generate FTP return codes. I know I can test this manually,
but I would really like to determine this error at runtime in Access for
diagnostic purposes. As it stands, I have no way of distinguishing between an
incorrect username/password and a Dir that is legitimately empty because
there are no files on the FTP server; both result in normal termination of
FTP and an empty file list.
Is there a way to direct the output of the FTP session into a text file so
that I can examine the contents for potential FTP errors?