PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Frage zu ftp upload



sunny-boy3
10.07.2009, 21:47
hi habe mir ebend nen ftp upload geptoggt meine code

:

Dim sLocalPath As String = "c:\Test.txt" '
Dim sLocalFile As String = "Test.txt" '
Dim sFTPHost As String = "ftp.xxxx.qw.ohost.de"
Dim sUserName As String = "xxxx"
Dim sPassword As String = "waasy"
My.Computer.Network.UploadFile(sLocalPath & sLocalFile, sFTPHost & My.Computer.Clock.LocalTime.DayOfWeek & "_" & sLocalFile, sUserName, sPassword, True, 500, FileIO.UICancelOption.DoNothing)
MsgBox("Uploadet")


nur bekomme ich immer diesen fehler


"ftp.xxxx.qw.ohost.de5_Test.txt" ist keine gültige Remotedateiadresse. Eine gültige Adresse muss ein Protokoll, einen Pfad und einen Dateinamen enthalten. Parametername: address

inout
10.07.2009, 21:50
Versuchs mal mit ftp://...

sunny-boy3
10.07.2009, 21:51
Versuchs mal mit ftp:// (ftp://.)...
wie meinst den das?

"ftp://xxx.qw.ohost.de"?

habe ich scojn proiert

Sawyer
10.07.2009, 21:55
So meint er das

My.Computer.Network.UploadFile(sLocalPath & sLocalFile, "ftp://" & sFTPHost & My.Computer.Clock.LocalTime.DayOfWeek & "_" & sLocalFile, sUserName, sPassword, True, 500, FileIO.UICancelOption.DoNothing)

MfG

inout
10.07.2009, 21:56
wie meinst den das?
Die Fehlermeldung sagt doch, du sollst ein gültiges Protokoll voranstellen. Also ftp://ftp.xxxx.funpic.de...

sunny-boy3
10.07.2009, 22:05
Die Fehlermeldung sagt doch, du sollst ein gültiges Protokoll voranstellen. Also ftp://ftp.xxxx.funpic.de...


Hab as jetzt so aber funzt immer noch net

Dim Path As String = "c:\"
Dim File As String = "Test.txt"
Dim FTP As String = "ftp://ftp.xxxx.qw.ohost.de"
Dim UserName As String = "xxxx"
Dim Password As String = "xxxx"
My.Computer.Network.UploadFile(Path & File, "FTP://" & My.Computer.Clock.LocalTime.DayOfWeek & "_" & File, UserName, Password, True, 500, FileIO.UICancelOption.DoNothing)
MsgBox("Uploadet")

Sawyer
10.07.2009, 22:09
Dim FTP As String = "ftp://ftp.xxxx.qw.ohost.de"Das kann auch nicht funktionieren , schreib es so:
Dim FTP As String = "xxxx.qw.ohost.de"


My.Computer.Network.UploadFile(Path & File, "FTP://" & My.Computer.Clock.LocalTime.DayOfWeek & "_" & File, UserName, Password, True, 500, FileIO.UICancelOption.DoNothing)

edit:
wobei es müsste so aussehen


My.Computer.Network.UploadFile(Path & File, "FTP://" & My.Computer.Clock.LocalTime.DayOfWeek & "/" & File, UserName, Password, True, 500, FileIO.UICancelOption.DoNothing)


MfG

sunny-boy3
10.07.2009, 22:16
Dim FTP As String = "ftp://ftp.xxxx.qw.ohost.de"Das kann auch nicht funktionieren , schreib es so:
Dim FTP As String = "xxxx.qw.ohost.de"



edit:
wobei es müsste so aussehen




MfG


Wieder Fehler

Die Adresse für UploadFile muss einen Dateinamen enthalten."}

Ps habe das jetzt so : Dim Path As String = "C:\Test.txt"
Dim Path As String = "C:\Test.txt"
Dim File As String = "Test.txt"
Dim FTP As String = "xxxx.qw.ohost.de"
Dim UserName As String = "xxxx"
Dim Password As String = "xxxx"
My.Computer.Network.UploadFile(Path & File, "FTP://" & My.Computer.Clock.LocalTime.DayOfWeek & "_" & File, UserName, Password, True, 500, FileIO.UICancelOption.DoNothing)
MsgBox("Uploadet")

aber funkt net

Sawyer
10.07.2009, 22:23
Hast du es denn bereits so getestet ? Normal müsste es so funktionieren.


My.Computer.Network.UploadFile(Path & File, "FTP://" & My.Computer.Clock.LocalTime.DayOfWeek & "/" & File, UserName, Password, True, 500, FileIO.UICancelOption.DoNothing)MfG

edit:


Ps habe das jetzt so : Dim Path As String = "C:\Test.txt"
Dim Path As String = "C:\Test.txt"
Dim File As String = "Test.txt"
Dim FTP As String = "xxxx.qw.ohost.de"
Dim UserName As String = "xxxx"
Dim Password As String = "xxxx"
My.Computer.Network.UploadFile(Path & File, "FTP://" & My.Computer.Clock.LocalTime.DayOfWeek & "_" & File, UserName, Password, True, 500, FileIO.UICancelOption.DoNothing)
MsgBox("Uploadet")

aber funkt netkann auch nicht gehen da du 2x das selbe als Dateipfad übergibst , so muss das funktionieren:


My.Computer.Network.UploadFile(Path, "ftp://" & My.Computer.Clock.LocalTime.DayOfWeek & "/" & File, UserName, Password, True, 500, FileIO.UICancelOption.DoNothing)

sunny-boy3
10.07.2009, 22:26
Hast du es denn bereits so getestet ? Normal müsste es so funktionieren.



MfG
{"Von der Übertragungsverbindung können keine Daten gelesen werden: Eine vorhandene Verbindung wurde vom Remotehost geschlossen."}

Zeigt mir zwar nen balken aber der schließt sich wieder

Sawyer
10.07.2009, 22:40
Also ich habe es jetzt mal richtig getestet und rausgefunden warum es nicht geht , so müsste es jetzt aber stimmen:


My.Computer.Network.UploadFile(Path , "ftp://" & FTP & "/" & My.Computer.Clock.LocalTime.DayOfWeek & "_" & "test.txt", UserName, Password)MfG

sunny-boy3
10.07.2009, 22:44
Also ich habe es jetzt mal richtig getestet und rausgefunden warum es nicht geht , so müsste es jetzt aber stimmen:


My.Computer.Network.UploadFile(Path , "ftp://" & FTP & "/" & My.Computer.Clock.LocalTime.DayOfWeek & "_" & "test.txt", UserName, Password)MfG


wieder fehler

Der angegebene Pfad endet mit einem Verzeichnistrennzeichen. Parametername: sourceFileName

Sawyer
10.07.2009, 22:50
Der angegebene Pfad endet mit einem Verzeichnistrennzeichen. Parametername: sourceFileName

Also liegt es an dem DateiPfad , teste es mal so

Dim sLocalPath As String = "C:\Test.txt"

MfG

sunny-boy3
10.07.2009, 22:53
Also liegt es an dem DateiPfad , teste es mal so

Dim sLocalPath As String = "C:\Test.txt"MfG


Du hast mal wieder recht gehabt hääte ich auch drauf kommen müßen

10000 thanks