Greetings, I wasn't sure where to put this since I didn't see an api forum.
I'm not implementing this particular code in
VB, but it's all api, so it shouldn't matter, should it?
I want to use FTP.exe through createprocess api so that I can implement waitforsingleobject.
Here is my command:
Code:
createprocess("c:\winnt\system32\cmd.exe","c:\winnt\system32\cmd.exe /C c:\winnt\system32\ftp.exe -i -s:ftpscript.txt > c:\temp\ftp.out"), 0,0,0,0,0, sys(5)+sys(2003),@lcStartupInfo, @lcProcInfo)
I'm using cmd.exe cause I want to pipe output. The ftp.out file has the following in it:
ftpscript.txt contains:
open
IPAddress
username
password
binary
put bob.xls
bye
ftp.out contains:
ftp> ftp>
ftp> open
IPAddress
Invalid command.
ftp>
Username
Invalid command.
ftp>
password
Not connected.
ftp> binary
Not connected.
ftp> put bob.xls
bye
This works without createprocess, but then I can't use WaitForSingleObject, right?
Thanks