
March 4th, 2004, 01:58 PM
|
 |
unlink /usr/bin/*
|
|
Join Date: Jan 2004
Location: Vancouver, Canada
|
|
|
FTP Problem
Hey i made a program that accesses FTP in a very stupid way, for fast actions.
Code:
Function ftpReady() As Boolean
If ftp.StillExecuting = True Then
ftpReady = False
Else
ftpReady = True
End If
End Function
Private Sub cmdConnect_Click()
Label1.Caption = "Connecting"
ftp.Protocol = icFTP
ftp.URL = "ftp.ei-planet.com"
ftp.UserName = "eiplanet"
ftp.Password = "*"
ftp.RequestTimeout = 40
ftp.Execute , "DIR"
Do While ftp.StillExecuting
DoEvents: DoEvents: DoEvents
Loop
Label1.Caption = "Connected"
End Sub
Private Sub cmdExecute_Click()
Dim what As String
Dim where As String
On Error GoTo ERR1
Label1.Caption = "Proccessing"
Select Case txtCommand.Text
Case "special:goto"
where = InputBox("Which directory do you want to go to")
ftp.Execute , "CD " & Chr(34) & where & Chr(34)
Do Until ftpReady
DoEvents: DoEvents: DoEvents: DoEvents
Loop
Label1.Caption = "Connected"
Exit Sub
Case "special:download"
what = InputBox("Which file do you want to download")
ftp.Execute , "GET " & Chr(34) & what & Chr(34) & " " & Chr(34) & "R:\" & Chr(34)
Do Until ftpReady
DoEvents: DoEvents: DoEvents: DoEvents
Loop
Label1.Caption = "Connected"
Exit Sub
End Select
MsgBox "You have made a wrong command"
Label1.Caption = "Connected"
Exit Sub
ERR1:
MsgBox "ERROR"
End Sub
Private Sub Form_Unload(Cancel As Integer)
ftp.Cancel
End Sub
but when i open the program, enter special:recieve and write the file, nothing happens.
i wanna know whats the problem
thanks in advace
|