. 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 |
Can u describe what kind of testing are for OTC derivates by banks.
i want to when we will write the scripts either after getting the build or after getting the SRS?
how to write vb script code for login gmail page by using notepad and how to run script in notepad
Mention what if you do not specify anything when you call a procedure?
What variable can you use to share info across the whole application for one user?
What is the use of the instr function?
Which in-built functions are used to convert the specified expression in the form of date and string in the vbscript language?
what is diff between static and dynaic arrys?
What methods are used to create text files and open text files in the vbscript language?
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
How to find the font in qtp. Scenario:After entering the username and passwd you will be navigate into the "welcome:Username" page.Now I want to extarct font for this message.
Write a Program to add 2 numbers without using operators (+,-) and without using third variable. Note: Use VBScript only Hint: You can use other operators like '/' & '*'(Division & Multiplication)