Need a script which can create a file using the data of another file.
I've done a ton of scripting in Perl, but right now I just need something small done in VBS, and I dont have the time to do it myself and learn VBS.
What I need done is the following, running on a windows 2003 server.
I have a file named d.txt containing a list with names for example :
I want this script to read each line and create a file e.txt making the output like this :
my name is eric banner
my name is bob banner
my name is bethany banner
The first : names line is to be ignored.
This is something very simple, I looked at some snippets, but VBS is something complely different for me.
OK, but just this once. ;-)
Set fs = CreateObject("Scripting.FileSystemObject")
Set inFile = fs.OpenTextFile("d.txt")
Set outFile = fs.OpenTextFile("e.txt", 2, True) ' 2 = ForWriting
Do Until inFile.AtEndOfStream
sText = inFile.ReadLine
If Len(sText) Then
outFile.WriteLine "my name is " & sText & " banner"
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
Thank you so much!
Works like a charm, I downloaded qbasic from a museum and did it in basic. But this is way way nicer Qbasic is in my recycle bin where it belongs.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center