Hello,
Using VBScript (only), How to write different type of data in the same file ?
I mean by example :
--------------------------------------------------------------------------------------------
DIM f9, Fso10, oShell
Set f9 = CreateObject("Scripting.FileSystemObject")
Set Fso10 = CreateObject("Scripting.FileSystemObject")
SET f9 = Fso10.CreateTextFile("D:\DATA\FILE2.txt")
f9.write("set namepackage=packet1" & chr(13) )
f9.write("set namepackagenoCOF=packet1COF" & chr(13) )
f9.write("set versionpackage=1.0" & chr(13) )
'
Set oShell = CreateObject ("WScript.Shell")
oShell.run("CMD /C FOR /F ""tokens=*"" %a IN (D:\DATA\FILE1.txt) DO (ECHO %a >> D:\DATA\FILE2.txt) ")
--------------------------------------------------------------------------------------------
This script should write the 3 data from "f9.write", inside the file FILE2.txt
and write all the lines from FILE1.txt, inside the file FILE2.txt too, without delete the 3 first data.
But it's not the case.