|
-
May 22nd, 2013, 01:38 PM
#1
Thread Starter
Addicted Member
Hope I'm not way off-base here, but....
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
-
May 22nd, 2013, 01:46 PM
#2
Thread Starter
Addicted Member
Re: Hope I'm not way off-base here, but....
Nevermind, folks... I'm the moron!
The ftpget.txt file didn't specify where to put the gotten file, so it got stuffed right where the program was run from, which is NOT where I wanted it... Something silly like specifying where you want the file parked after FTP's gotten it made ALL the difference! Sometimes it pays to write out the post, just because it makes you think a little more clearly!
Happy Wednesday to all and sundry!
Joe
-
May 22nd, 2013, 02:16 PM
#3
Re: Hope I'm not way off-base here, but....
Sometimes it pays to write out the post, just because it makes you think a little more clearly!
Does that mean you'lll be repping everyone just for being here. then?
As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"
Reviews: "dunfiddlin likes his DataTables" - jmcilhinney
Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!
-
May 22nd, 2013, 02:47 PM
#4
Thread Starter
Addicted Member
Re: Hope I'm not way off-base here, but....
 Originally Posted by dunfiddlin
Does that mean you'lll be repping everyone just for being here. then? 
Rep, Rep, Rep.....(grin)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|