05-11-2022, 07:27 AM
(This post was last modified: 05-11-2022, 07:29 AM by PhilOfPerth.)
@bplus: I fiddled around with the snippet, and eventually got it to compile ok with this code:
and the lines were removed! Great stuff; thanks. Not sure what was different, but the method you gave worked really well.
I found in the meantime that the Z file was not there (on my copy) so I downloaded that and treated it as well. I'll upload the reduced files in a few minutes.
(yes, I remembered to change the filenames back to just one char).
Code: (Select All)
For a = 1 To 26
filename$ = Chr$(a + 64)
newfile$ = Chr$(a + 64) + "new"
Open filename$ For Input As #1
Open newfile$ For Output As #2
While Not EOF(1)
Input #1, fline$
If _Trim$(fline$) <> "" Then
Print #2, fline$
Else
deletedlines = deletedlines + 1
Print filename$; deletedlines; " ";
End If
Wend
Close
Next
Close
I found in the meantime that the Z file was not there (on my copy) so I downloaded that and treated it as well. I'll upload the reduced files in a few minutes.
(yes, I remembered to change the filenames back to just one char).