. Program for sorting of numbers in vb script?
Answers were Sorted based on User's Feedback
Answer / abc
Const FOF_CREATEPROGRESSDLG = &H0&
Const MyZip ="C:Documents and SettingsabcdDesktopWIPMyZipFile.zip"
Const File1 = "C:Documents and SettingsabcdDesktopWIPABCD.xml"
'-------------- create empty zip file ---------
'Create the basis of a zip file.
CreateObject("Scripting.FileSystemObject") _
.CreateTextFile(MyZip, True) _
.Write "PK" & Chr(5) & Chr(6) & String(18, vbNullChar)
'-------------- zip ---------------------------
'get ready to add files to zip
With CreateObject("Shell.Application")
'add files
.NameSpace(MyZip).CopyHere File1, FOF_CREATEPROGRESSDLG
End With
wScript.Sleep 1000
wscript.echo "Done!"
'-------end adding files to zip folder------------------------------
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / amrita
We will assign the series of numbers in array then will the sort that. Below is the code:
a = array(3,4,9,2,7,1)
For i=0 to ubound(a)
For j=0 to ubound(a)
If strComp(a(i),a(j),1) < 0 Then
temp = a(i)
a(i) = a(j)
a(j) = temp
End If
Next
Next
For i=0 to ubound(a)
print a(i)
'It will print 1,2,3,4,7,9
Next
| Is This Answer Correct ? | 0 Yes | 0 No |
What is difference between vbscript and vba?
how to find the textfile in the folder and copy file from one folder to another folder useing parameterigation in QTP
What are the disadvantages of vbscript?
What is the purpose of drive object of scripting.filesystemobject class in vbscript?
What are the special sub-types in vbscript?
Why is the use of exit do or exit for statements within loops discouraged?
What are the naming conventions while declaring a variable in the vbscript language?
How to access array data?
Which object is used to work with the database in the vbscript language and what statement is used to create this object?
what is the standards used for writing the script in QTP
How to identify column in VSFlexgrid? My VSFlexgrid window is identified as 'Active X Control'
Which in-built function related to an array joins substrings into one string in the vbscript language?