We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
textFile = "C:\temp\04test.txt" saveTo = "C:\temp\" writeTo = "" headingPattern = "(GROUP*)" dim fso,fileFrom,regex set fso = CreateObject("Scripting.FileSystemObject") set fileFrom = fso.OpenTextFile(textFile) set regex = new RegExp with regex .Pattern = headingPattern .IgnoreCase = false .Global = True end with while fileFrom.AtEndOfStream <> true line = fileFrom.ReadLine set matches = regex.Execute(line) if matches.Count > 0 then writeTo = saveTo & matches(0).SubMatches(0) & ".txt" set fileTo = fso.CreateTextFile(writeTo) else fileTo.WriteLine(line) end if wend set fileFrom = nothing set fso = nothing set regex = nothing
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Running Access application from Task Scheduler||6||68|
|Batch/VBscript: import massively chedule task in windows task scheduler||15||58|
|Check folder every for files and print them||5||41|
|VB Script: Correction backup files and folders v3||11||31|