Creating a batch/vbs file to append start and end of paragraph
Closed
                    
        
                    BrianGreen
    
        
                    Posts
            
                
            1005
                
                            Registration date
            Saturday January 17, 2015
                            Status
            Moderator
                            Last seen
            September 30, 2021
            
                -
                            Updated by BrianGreen on  8/12/16 at 08:34 AM
                        
yg_be Posts 24281 Status Contributor - Jan 2, 2017 at 10:12 AM
        yg_be Posts 24281 Status Contributor - Jan 2, 2017 at 10:12 AM
        Related:         
- Creating a batch/vbs file to append start and end of paragraph
 - Windows 10 iso file download 64-bit - Download - Windows
 - Create rar file mac - Guide
 - Dvi file - Guide
 - Safari cannot open the page because it is a local file - Guide
 - How to open .ps file - Guide
 
1 response
                        
                    Hi, I am proposing this vbs:
            Dim textline, fso, f1, F2, aline
Set fso = CreateObject("Scripting.FileSystemObject")
Set f1 = fso.OpenTextFile("C:\data\temp\ccm\input.txt", 1, True)
Set F2 = fso.CreateTextFile("C:\data\temp\ccm\output.txt")
While f1.AtEndOfStream <> True
        aline = f1.Readline        'read in the row
       
        F2.WriteLine "<p>" & aline & "</p>"
        F2.WriteLine ""
Wend
f1.Close 'close the input file
F2.Close