I have an issue where I am running an executable from within a vbscript that does some more advanced processing of the file. What I would like to know is does the script wait until the execution is completed before going to the next step of the script (i.e. fso.DeleteFile objFile.Name).
Windows Haiku:
Serious error.
All shortcuts have disappeared.
Screen. Mind. Both are blank.
Code:
For Each objFile in colFiles
Set fso = CreateObject ("Scripting.FileSystemObject")
GetFile = Split(fso.OpenTextFile (objFile.Name).ReadAll,vbCr)
TempFile = objFile.Name & ".tmp"
Set fw = fso.CreateTextFile (TempFile, ForWriting, True)
i = 0
For Each strLine in GetFile
i = i + 1
'Wscript.Echo i & " " & strLine
If i > 8 Then
'Wscript.Echo strLine
fw.WriteLine strLine
End if
Next
fw.Close
fso.MoveFile TempFile , "E:\temp\" & objFile.FileName & ".csv"
Command.Run(cmd)
fso.DeleteFile objFile.Name
Next
Windows Haiku:
Serious error.
All shortcuts have disappeared.
Screen. Mind. Both are blank.