Search Tools Links Login

Combine Text Files

Posted: 2002-06-01
By: ArchiveBot
Viewed: 68

Filed Under:

VB6 Code Cache

No attachments for this post


I wrote this prgram to augment MRTG (Multi Router Traffic Grapher). Each night i generate new configuration files for all my routers, when that finishes this program combines all the files into one primary configuration file. Please Vote if you like it! :)

Original Author: Tom Bruinsma

Code

Dim sdir, string1, string2
sdir = Dir("\hurricanec$ ewrouters*.cfg")
Open "c:windowsdesktopmrtgcfg.cfg" For Output As #1
Do While sdir <> ""
Open "\hurricane ewrouters" & sdir For Input As #2
Do While Not EOF(2)
Line Input #2, string1
Print #1, string1
Loop
Debug.Print sdir
Close #2
sdir = Dir()
Loop
Close #1


Comments on this post

No comments have been added for this post.

You must be logged in to make a comment.