|
-
Jul 17th, 2000, 03:53 PM
#1
Thread Starter
Registered User
hi all.
I am trying to download a file from my FTP using the Inet control, and I just cant. why??
Here is the code I uses:
Code:
Inet1.Protocol = icFTP
Inet1.Username = "abcd"
Inet1.Password = "abc"
Inet1.URL = "ftp://ftp.geocities.com"
Inet1.Execute "GET /docs/1.txt c:\1.txt"
What is wrong in this code???
I just wanna download the file "ftp.geocities.com/docs/1.txt" into "c:\1.txt"
waiting for answer,
-
Jul 17th, 2000, 03:54 PM
#2
Fanatic Member
Place the host first i think that's the prob.
other than that it looks fine.
Code:
Inet1.Protocol = icFTP
Inet1.URL = "ftp://ftp.geocities.com"
Inet1.Username = "abcd"
Inet1.Password = "abc"
Inet1.Execute "GET /docs/1.txt c:\1.txt"
Laterz,
D!m
-
Jul 17th, 2000, 04:06 PM
#3
Thread Starter
Registered User
Thanks but It still doesnt work.
I still get an error: "Unable to connect to remote host"
any other ideas?
-
Jul 17th, 2000, 04:28 PM
#4
Hyperactive Member
Well, obviously, the last part of the code isn't the one arguing. It just can't conncet.
You gotta check if the hostname is right and maybe define the port on which it should connect, works for me.
Signed, Rodik ([email protected])
Programmer,usesVB6ED
===========================
Copyright©RodikCo,2002.
Dont mind this signature ;] Its old
-
Jul 17th, 2000, 04:41 PM
#5
Thread Starter
Registered User
Will you (or some1) please give me a piece of code for uploading the file "c:\1.txt" into "ftp.geocities.com/BLAH/1.txt" ?
lets say i registered the username: Blah
and I registered the password: 1234
Play with the port or with whatever you want, just post the correct piece of code.
Thanks Again.
-
Jul 17th, 2000, 04:55 PM
#6
Hyperactive Member
I doubt you can do that
Are you sure the geocities.co will let you upload to /BLAH?
Or does geocities map each user's login to their own private root file system.
Lior, the rule when faced with a troubleshooting excercise like this is to first establish if you can "do it the long way". What I mean is, start ftp manually - you know the funny looking DOS prompt thing.
If you already know all about it, ignore my post as it will only irritate you 
Type open ftp.geocities.com
This will prompt you for a username. Put in the username and press enter.
Next a prompt for your password will appear. Put in your password and press enter.
Finally, you will either get in or be rejected. When I used Blah/1234 I was rejected. You may have only meant those as examples so you can try yourself.
Once you are in, type your get command. remember "GET" is relative to the host, so you are saying to the host "please send me this file". If you want to upload TO geocities, then you need to use "put".
Som more hints on the command line ftp tool; type "dir" or "ls" (they amount to the same thing usually). See what files are available. Navigate through the site using the command line tools and the familiar "cd" command.
Basically, if you can do it with the command line, then you ought to be able to do it with VB. Until you confirm you can do it with the command line, I don't think you can expect a solution from anyone.
Regards
Paul Lewis
-
Jul 17th, 2000, 04:59 PM
#7
Fanatic Member
I'm sorry if i'm going to repeat what Paul said but i just don't have time to read it. 
Anyways...it almost garanteed that it's a l/p probelm..eigher you don't have access to that ftp or your suplying the wrong credentials.
Hope that helps,
D!m
-
Jul 17th, 2000, 05:11 PM
#8
Thread Starter
Registered User
Guys, I checked if I can upload files to \Blah at ftp.geocities.com, and it worked.
I did it using CuteFTP.
Geocities let me to upload files to my registered directory: \blah.
Any1, Please, I'm just frustrated, I need a piece of correct code. Why is it so complicated just to upload 1 ugly text file?
Waiting for my life saver,
-
Jul 17th, 2000, 05:33 PM
#9
Hyperactive Member
What is CuteFTP
If CuteFTP is a gui based ftp tool - sort of drag and drop stuff, then I am sorry but you cannot be sure that it is doing some things you are not aware of.
If it is a command line tool like the standard "ftp.exe" that comes with Windows NT (And I presume Windows 9X as well) then I am unable to offer any further help.
I suspect that CuteFTP is a gui and so I repeat my last suggestion to try to do it manually. If you do not wish to help yourself, I doubt you will get the code you seek.
I've never done any programming with the inet control so I cannot offer direct help there. I just know that ftp is relatively simple and there is very little that a control like the one you are using can get wrong.
I can help more but only if you need it and if you try the command line ftp and manually put the file on the server (or get it if you want).
regards
Paul Lewis
-
Jul 17th, 2000, 05:40 PM
#10
Thread Starter
Registered User
it is working also with ftp.exe
please, some1, write for me just a few lines, the code itself.
Thanks. Still waiting.
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
|