Hi, again!
Seems I'm back to pick the collective brains of the community.... I've got a windows forms app that needs to grab a smallish file via FTP... The following command (from command line) works fine....
ftp -s:ftpget.txt -A 102.168.42.190
contents of ftpget.txt look like this:
get 000000098982.csv
bye
However...... In my windows forms app, there's a finction I wrote to handle this that I call FTPGet... Here's what it looks like:
Private Function FTPGet(ByRef file As String) As Boolean
'MsgBox(file & " " & Server)
Dim My_File As New System.IO.StreamWriter(path & "FTPGET.TXT")
My_File.WriteLine("get " & file)
My_File.WriteLine("bye ")
My_File.Close()
Thread.Sleep(100)
Shell("c:\WINDOWS\system32\ftp.exe -s:ftpget.txt -A " & Server, , True)
Thread.Sleep(100)
'MsgBox("after FTP attempt")
Return True
End Function
... and this never seems to work.... I get the new text in the ftpget.txt file each time, but no luck actually doing the ftp...
Anybody got any ideas?
Thanks, as always, for ANY light anyone can shed on this!
Joe
Seems I'm back to pick the collective brains of the community.... I've got a windows forms app that needs to grab a smallish file via FTP... The following command (from command line) works fine....
ftp -s:ftpget.txt -A 102.168.42.190
contents of ftpget.txt look like this:
get 000000098982.csv
bye
However...... In my windows forms app, there's a finction I wrote to handle this that I call FTPGet... Here's what it looks like:
Private Function FTPGet(ByRef file As String) As Boolean
'MsgBox(file & " " & Server)
Dim My_File As New System.IO.StreamWriter(path & "FTPGET.TXT")
My_File.WriteLine("get " & file)
My_File.WriteLine("bye ")
My_File.Close()
Thread.Sleep(100)
Shell("c:\WINDOWS\system32\ftp.exe -s:ftpget.txt -A " & Server, , True)
Thread.Sleep(100)
'MsgBox("after FTP attempt")
Return True
End Function
... and this never seems to work.... I get the new text in the ftpget.txt file each time, but no luck actually doing the ftp...
Anybody got any ideas?
Thanks, as always, for ANY light anyone can shed on this!
Joe