
difference between Shell.run and Shell.exec
Quote:
> Interesting. If you've managed to get your original problem solved, or at
least
>handled the FTP client issues, I'd appreciate it if you could post a brief
>description of the solution. TIA
Sorry, I haven't got anywhere in solving my problem! In fact I have now got
two problems:
1) the M$ Ftp client behave differently under SHELL.EXEC and SHELL.RUN
I still can not understand why the M$ ftp client produces different output
when executed with a shell.exec as opposed to a shell.run.
With shell.run the output contains all the things that appear on the screen
when executed from a "Cmd" shell by hand.
With shell.execute the output does not contain any "messages". For example
if you run by hand and issue an "open server.domain.com" command in response
you see:
Connected to server.domain.com.
220 server Microsoft FTP Service (version 4.0)
Since this message disappears I can not detect the type of server to which
I have connected.
It is important for my script to execute different code dependent on the
type of server!
I do not even see a command prompt viz "ftp>" in the stdout. In response to
some commands NO OUTPUT at all appears so if I issue a try
"string=execboj.stdout.readline" the program hangs.
I was originally trying to use a Shell.Exec instead of a Shell.run in order
to put my script into a loop waiting either for the execobj.status to
indicate the ftp run had finished or to be able to increment a counter in
order to give up and terminate the job after a time.
2) The MICROSOFT ftp client DOES NOT support PASSIVE MODE
I am unable to make the M$ ftp client operate in a "Passive mode" (see
http://slacksite.com/other/ftp.html#intro for an explaination of what I mean
by the term).
I have succeded in using the M$ ftp client to do drive a ftp transfer
between two M$ ftp servers. This involves using a "lieteral PASV" command
inorder to switch one of the ftp servers into what M$ call a "passive" mode.
However there does not appear to be ANY command that I can issue to the M$
ftp client in order to get the M$ ftp client to initiate the data
connection to the Ftp Server. A "quote port xxx,xxx,xxx,xxx,xxx,xxx"
using the IP address and port number that the server announced in response
to the "literal PASV" command is rejected as invlaid. However this
technique worked when linking ftp server to ftp server.
My boss didn't like the suggestion that we should use a different ftp
client. He saw the task (and cost of licencing) as prohibitive as we have
11000 workstations to upgrade. He feels he already pays M$ enough and it is
obviously my fault that I can't make M$ products work...........
regards gordon