. 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 |
write a vb script to add two 2*2 matrix
Which respective symbols are used to separate a line and to break the lengthy statement into multiple statements in the vbscript language?
what is descriptive programming in QTP and what is environment variable in QTP? where we store and what is its use?
write a program to display configuration of a local system with the help of vb script.
How to check the particular window is exist or not with out using check points
Which operator can be used to do an xor operation in vbscript?
hi Set myobj=Description.Create() myobj("type").value="submit" myobj("name").value="google search" myobj("html tag").value="button" browser("title:=google").page("title:=google").webButton (myobj).Click i was running above code in one weak back it was working fine i got result,again i opened after few days ,again i was trying to run the code it shows run time error in last line of my code ,why ?pls answer my question?
Which operator can be used to check if two numbers are equal or not in vbscript?
Create a file system object to do the following i. Create a folder ii. Create a text file in the folder iii. Update text file with some tex
about vb scripting programs this type of all question& answers
Dear All, I am geting below IE error whilie executing the QTP scripts in Batch mode "Internet Explorer has encountered a problem and needs to close. We are sorry for the inconvenience." can any one suggest me how to resolve this issue . Thanks Balaji
Which is the default Data types in VBScript?