Microsoft
Software
Hardware
Network
Question : How can I preserve an array in vbs?
I have created the following script. It opens LIst.txt and reads it.
List.txt's contents
A,B,C,X
H,E,L,G
Code:
Dim FSO, Folder
Const ForReading = 1
Set objFSO = CreateObject("Scripting.Fi
leSystemOb
ject")
Set objFile=objFSO.OpenTextfil
e("C:\List
.txt")
Do Until objFile.AtEndOfStream
WholeLine = objFile.ReadLine
details = WholeLine
RL = split (details, ",")
If UBOUND(RL) = 3 Then
WScript.Echo RL(0) 'an array of four elements
WScript.Echo RL(1)
WScript.Echo RL(2)
WScript.Echo RL(3)
End IF
wscript.echo "------------------------"
Loop
objFile.Close
'I would like to preserver the above array and read the List file from outside the loop
For Each .......
Wscript.Echo RL(0)
Wscript.Echo RL(1)
Wscript.Echo RL(2)
Wscript.Echo RL(3)
Next
Answer : How can I preserve an array in vbs?
Try this:
iconv -f ASCII -t UTF-16 -o outputfile textfile
Random Solutions
How do I use the Windows XP installation disc to replace missing system files?
How can you search e-mail within Outlook 2010 and not use the index?
How do I get this PHP IMAP script to fetch the body of emails? I can't get it to work.
Roaming Profiles in Windows 7 Pro and SBS 2008
MPP microsoft project plan. How can i open a file created in ver 2010 in MPP 2003 or 2007.
Windows Small Business Server 2008: Critical Event Notification
Basic php/mysql questions
Excel 2007 Can Not Display Images From Web
Convert Doc files to Docx in SharePoint
SSRS Combine two datasets into one data region - Must be in report not in SQL server