|
-
Apr 5th, 2004, 03:14 AM
#1
Thread Starter
New Member
---SOLVED--- VB6: FTP by Inet: CONNECT and CD work, DIR and GET won't
My fault..
1.) I assumed DIR to get also sub directories. In fact, DIR gets only documents, not sub directories.
2.) I made a mistake in my GET string (see the "," after first parameter)
Nevertheless thanx for ur interest!
Hello Buddies,
can anyone help me with this simple code?? FTP connect with VB's inet component works, CD works, but DIR and GET won't work. Looks like FTP client doesn't see data on FTP server.
When I use my system's FTP client ftp.exe instead, DIR and GET seems to work properly. FTP server seems to be a unix server.
VB code:
Private Sub Form_Load()
With Inet1
.URL = myURL
.UserName = myUser
.Password = myPw
.Execute , "DIR"
Debug.Print "DIR1: " & .ResponseInfo
.Execute , "CD /my_directory"
Debug.Print "CD: " & .ResponseInfo
.Execute , "DIR"
Debug.Print "DIR2: " & .ResponseInfo
.Execute , "GET myTestDataWithALongName.doc, c:\temp\test.dat"
Debug.Print "GET: " & .ResponseInfo
End With
End Sub
Outline is:
DIR1: Es sind keine weiteren Dateien vorhanden. [No data found]
CD: Der Vorgang wurde erfolgreich beendet. [command successful]
DIR2: Es sind keine weiteren Dateien vorhanden. [No data found]
GET: 200 Type set to I.
200 PORT command successful.
550 Test.doc.NPRWE,: No such file or directory
550 Test.doc.NPRWE,: No such file or directory
Last edited by hoppel_poppel; Apr 5th, 2004 at 06:34 AM.
-
Apr 5th, 2004, 04:50 AM
#2
Thread Starter
New Member
Maybe it's something about permissions but I don't figure out what it is exactly... when I try a PUT I get "permission denied". The fact that inet doesn't see anything could also be something about permission denial.
But - when I use ftp.exe or internet explorer ftp works fine! Do I have to customize that inet component in a special way concerning permissions or what the heck?
thanks for ur help
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
|