[RESOLVED] Am I missing something again, or is it really possible that there are.....
... NO references to FTP in any of these forums (fora?)? Used the little search window on upper-right of the toolbar, and got NO hits for ftp or FTP (does case matter?) Anyhow, I'm trying to find some sort of command-line FTP "get" command in which I can specify what to get, where to park it, and that the FTP login is to be anonymous.... I've seen the -s switch on command-line ftp, but that would require me to write out the "what to get, and where to park it" stuff to a text file.... I could do that, if I have to, but would rather not... Bigger question is how, from my VB program, to pass the FTP commands out to be executed.... Is this some sort of "shell" thing? Wish I was more familiar with the terminology, but I'm not....
Thanks VERY much for any pointers any of you can share!!
Joe
Re: Am I missing something again, or is it really possible that there are.....
You should be able to do this through code without the need to call the command line ftp
have you looked at the FTP Client sample from the online help?
You may find this useful as well
http://www.codeproject.com/Articles/...ry-for-NET-2-0
Re: Am I missing something again, or is it really possible that there are.....
I think the search filters out words less than 4 characters... I know I've had issues searching for XML as well... seems to me it removed 1, 2, & 3 lettered words... they are considered "too short" ...
-tg
Re: Am I missing something again, or is it really possible that there are.....
Re: Am I missing something again, or is it really possible that there are.....
I wouldn't trust Search as far as I can heave it into a geostationary orbit at the moment. Half the time it tells me that I don't exist!
Re: Am I missing something again, or is it really possible that there are.....
HUH?! Wha? Who said that?
-tg
Re: Am I missing something again, or is it really possible that there are.....
I thought I saw a post between dbasnett and techgnome, but it just doesn't seem to be there.
By the way, I've had a hard time searching for threads that I KNOW exist because I started them. The short word filter does seem to be effective at removing searches for things like UDP and XNA.
Re: Am I missing something again, or is it really possible that there are.....
Thanks for the pointers, again folks! @dbasnett - I've looked at the info you pointed to (actually spent a good bit of yesterday afternoon, and this morning), and WOW! Maybe I'm dense, but that sure seems overly complicated, and still I don't see anything like "get this file".... I can assume that I'll know the IP address of the server, and that the server supports anonymous login, and that I'll know the name of the file I want.... With that info in hand, I suppose I can set up the "credentials" property... but not having any examples in the help for VB makes it pretty tough to know how to "pull the trigger" on the "get" operation.... Anybody have a sample? Looking at this from another angle, is there anything inherently WRONG with using the command-line FTP with the -s switch, and stashing the pertinent FTP commands in a file?
I KNOW this can be done in SOME fashion, just need to figure out a reasonably-simple approach!
Thanks again for your support!
Joe
Re: Am I missing something again, or is it really possible that there are.....
Something like this:
Code:
Dim addr As Uri = New Uri("ftp://server/path/to/file.ext")
Dim wc As New Net.WebClient
wc.Credentials = New Net.NetworkCredential("anonymous", "password")
Try
wc.DownloadFile(addr, "localFileNameHere")
Catch ex As Exception
Stop
End Try
Re: Am I missing something again, or is it really possible that there are.....
Thanks, dbasnett, for the snippet! I'll mark this one solved... on to the next challenge!
Joe