. 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 ENVIRONMENT VARIABLES?and where it is used in real time scenario?
How are comments handled in the vbscript language?
how to acces the remote mechine using vb cript(QTP)
How can you destroy an object in vbscript?
write a vb script to display factorial of a number using function
Diff between web table ,datatable and data base (QTP)
Which keyword is used to declare a variable in the vbscript language?
What is vbscript?
hey please tell me how to retriev data from excel sheet which puts the login name and password in the application? plz send me the code..please help me
Whenever I use Wscript.Echo Qtp raising Run time error as 'Object required for Wscript' How I can create object for Wscript
What is the technology used by vb script?
How do you write an SQL insert statement?