VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Combine Text Files

by Tom Bruinsma (4 Submissions)
Category: Files/File Controls/Input/Output
Compatability: Visual Basic 3.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (4 Votes)

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! :)

Rate Combine Text Files

Dim sdir, string1, string2
sdir = Dir("\\hurricane\c$\newrouters\*.cfg")
Open "c:\windows\desktop\mrtgcfg.cfg" For Output As #1
Do While sdir <> ""
 Open "\\hurricane\newrouters\" & 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

Download this snippet    Add to My Saved Code

Combine Text Files Comments

No comments have been posted about Combine Text Files. Why not be the first to post a comment about Combine Text Files.

Post your comment

Subject:
Message:
0/1000 characters