One of our clients has been having a lot of network problems lately. When I went to retrieve the errors text file on their server computer I discovered about a dozen files, one was the correctly named file
"errors.txt"
but the others had names like
"errors (computernameA v1).txt"
"errors (computernameA v2).txt"
"errors (computernameB v1).txt" etc etc.
Our software is definitely not creating files with these names although it is creating their content.
The network being down will obviously throw errors in very many places in the client application. Part of the handling of all errors is to log them to the server computer. The routine that does this first tries to find the error file and if it can't do so it tries to create it. Some of these other error files contain a lot of errors suggesting that a local 'shadow' of the error.txt being used for successive errors while the network was down over a not insignicant time period? then once the network is back up again this is being put onto the server and renamed so as not to clash with existing file names
can someone please explain what's happening here and what software is doing it?
edit
In response to a request for the relevant code
170 On Error Resume Next
Dim fs
180 Set fs = CreateObject("Scripting.FileSystemObject")
Dim Item1 As String
Dim Item2 As String
190 Item1 = strErrorFolder
200 If fs.FolderExists(strErrorFolder) <> True Then
210 MkDir Item1
220 End If
230 Item1 = strErrorFolder & "\Errors.txt"
240 If fs.FileExists(Item1) <> True Then
250 Item2 = App.Path & "Blank.txt"
260 FileCopy Item2, Item1
270 Item2 = ""
280 SetAttr Item1, vbNormal
290 Open Item1 For Output As #1
300 Write #1, "ErrorDateTime", "ErrorUser", "DatabaseAddress", "ProgramVersion", "Module", "SubRoutine", "LineNumber", "ErrorCode", "ErrorDescription"
310 Close #1
320 End If
330 Open Item1 For Append As #1
340 Write #1, ErrorDateTime, ErrorUser, Left(PANDATABASE, 1), ProgramVersion, Module, SubRoutine, LineNumber, ErrorCode, ErrorDescription
350 Close #1
360 On Error GoTo 0
End Sub 'errorhandled not