vbscript - need to have a vb script that replaces one line on four text files and then outputs them to a new file name -


i need vbscript read & replace text in 4 separate text files , save different file names (*.ws filename). want ask me want replace text with. text need replace 6 digits after 2 letters under luname, on each text file. 6 digits resemble assets , different on each. below 4 separate text files.

text file 1

   [profile]    id=ws    version=9    [telnet3270]    luname=fe223006    hostname=plx.access.com    security=n    certselection=autoselect    [communication]    link=telnet3270    [3270]    screensize=43x80    hostgraphics=y    queryreplymode=auto    hostcodepage=037-u    [keyboard]    cuakeyboard=1    language=united-states    ibmdefaultkeyboard=n    defaultkeyboard=c:\programdata\ibm\personal communications\bnsf.kmp    [lastexitview]    a=3 177 396 656 456 83 8 15 400 0 fixedsys— 37 

text file 2

[profile] id=ws version=9 [telnet3270] luname=ff223006 hostname=plx.access.com security=n certselection=autoselect [communication] link=telnet3270 [3270] screensize=43x80 hostgraphics=y queryreplymode=auto hostcodepage=037-u [keyboard] cuakeyboard=1 language=united-states ibmdefaultkeyboard=n defaultkeyboard=c:\programdata\ibm\personal communications\bnsf.kmp [lastexitview] a=3 177 396 656 456 83 8 15 400 0 fixedsys— 37 

text file 3

[profile] id=ws version=9 [telnet3270] luname=fg223006 hostname=plx.access.com security=n certselection=autoselect [communication] link=telnet3270 [3270] screensize=43x80 hostgraphics=y queryreplymode=auto hostcodepage=037-u [keyboard] cuakeyboard=1 language=united-states ibmdefaultkeyboard=n defaultkeyboard=c:\programdata\ibm\personal communications\bnsf.kmp [lastexitview] a=3 177 396 656 456 83 8 15 400 0 fixedsys— 37 

text file 4

[profile] id=ws version=9 [telnet3270] luname=fh223006 hostname=plx.access.com security=n certselection=autoselect [communication] link=telnet3270 [3270] screensize=43x80 hostgraphics=y queryreplymode=auto hostcodepage=037-u [keyboard] cuakeyboard=1 language=united-states ibmdefaultkeyboard=n defaultkeyboard=c:\programdata\ibm\personal communications\bnsf.kmp [lastexitview] a=3 177 396 656 456 83 8 15 400 0 fixedsys— 37 

i have searched every script can , ones have found having issues with. might add i'm kind of familiar programming in vbs , have issue understanding things i'm still learning.

i suggest reading on getprivateprofilestring , it's partner, writeprivateprofilestring. windows way interact ini file, have posted here.

then might want @ article: http://www.freevbcode.com/showcode.asp?id=5390


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -