|
-
Dec 16th, 1999, 03:44 AM
#1
Thread Starter
Lively Member
ran into a problem using inet !
maybe you know some answers !
the transfer is ok, only problem is that after each filetransfer a new logfile is created on the remotehost.
I'm no ftp specialist so :
is this a remote setting ?
can supress this logfile using the requestheaders part of the INet.Execute statement ?
should i use inet.execute "close" after each transfer ?
other solution ?
by the way the remotehost is a vms / alpha-server
my code (stripped somewhat) is used to transfer files, which are generated automaticly every sometimes, to another server which adds the data to database.
on the form a inet control named FTP
sub main()
source = "c:\temp\test*.*"
FTP.RemoteHost = "remoteserver"
FTP.UserName = "anonymous"
FTP.Password = "letmein"
Do While Len(Dir(source)) > 0
'SEND IT TO HOST
sfile = Dir(source)
spath = sourcepath(source)
App.LogEvent "starting ftp execution", vbLogEventTypeInformation
FTP.Execute , "PUT " & spath & sfile & " " & sfile
' wait till ready
Do
DoEvents
Loop Until FTP.StillExecuting = False
'App.LogEvent "ftp execution terminated", vbLogEventTypeInformation
Loop
end sub()
Private Sub ftp_StateChanged(ByVal State As Integer)
If State = 12 Then
Kill spath & sfile
End If
End Sub
Function sourcepath(file As String)
Dim y As Integer
y = Len(file)
Do While (Mid(file, y, 1) <> "\") Or (y = 0)
y = y - 1
If y = 0 Then
y = Len(file)
Exit Do
End If
Loop
sourcepath = UCase(Left(file, y))
End Function
thanx in advance & happy holidays
Don.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|