Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP File to Server

Status
Not open for further replies.

nayfeh

Programmer
Mar 13, 2002
163
CA
Hi there,

I have a module that is used to append to a file. I'm having problems due to the permissions created when the file is created. I would like change this code, to have the file FTP'd to the server instead. Can you please show me if and how this can be done.

Thanks in advance.

TN

-------------
Sub AppendToFile(SourceName As String, DestName As String)
Dim SourceHandle As Integer
SourceHandle = FreeFile
Open SourceName For Input As #SourceHandle

Dim DestHandle As Integer
DestHandle = FreeFile
Open DestName For Append As #DestHandle

Do While Not EOF(SourceHandle)
Dim SomeText As String
Line Input #SourceHandle, SomeText
Print #DestHandle, SomeText
Loop

Close #SourceHandle
Close #DestHandle

If Dir(DestName) <> &quot;&quot; Then
Kill SourceName
End If

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top