I have a module (see below) that appends to a file if it exisits and creates a new one if it does not.
Since the file is sent to a different server, we're having a lot of issues with regards to user permissions.
I would like to copy the file to a local drive, then FTP to that server instead of copying it directly to that server. Is this possible, and if so, then how?
Your help is appreciated.
Thanks in advance!
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) <> "" Then
Kill SourceName
End If
Since the file is sent to a different server, we're having a lot of issues with regards to user permissions.
I would like to copy the file to a local drive, then FTP to that server instead of copying it directly to that server. Is this possible, and if so, then how?
Your help is appreciated.
Thanks in advance!
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) <> "" Then
Kill SourceName
End If