1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| Dim line
Dim result
Dim path
'path of the file
path = "C:\temp\vertical.txt"
Set Dico = CreateObject("Scripting.Dictionary")
Set FSOosf = CreateObject("Scripting.FileSystemObject")
Set Ftxt = FSOosf.OpenTextFile(path)
Do While Ftxt.AtEndOfStream <> True
line = Ftxt.ReadLine
for i = 1 to len(line)
if Dico.Exists(i) then
Dico(i) = Dico(i) & Mid (line, i, 1)
else
Dico.Add i, Mid (line, i, 1)
end if
next
i = 0
Loop
Ftxt.Close
Set FSOosf = nothing
Set Ftxt = nothing
for i = 1 to Dico.count
result = result & Dico(i)
next
Wscript.Echo result |
Partager