How to find a latest file from any folder
Answers were Sorted based on User's Feedback
Answer / david
in solaris / unix you can find the latest file by...
ls -lt
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / manjunathareddy
sPath="C:\FlightFrameWork"
Msgbox GetNewestFile(sPath)
Function GetNewestFile(ByVal sPath)
sNewestFile = Null
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFolder = oFSO.GetFolder(sPath)
Set oFiles = oFolder.Files
For Each oFile In oFiles
On Error Resume Next
If IsNull(sNewestFile) Then
sNewestFile = oFile.Path
dPrevDate = oFile.DateLastModified
Elseif dPrevDate < oFile.DateLastModified Then
sNewestFile = oFile.Path
End If
On Error Goto 0
Next
If IsNull(sNewestFile) Then sNewestFile = ""
GetNewestFile = sNewestFile
End Function
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / sha
How to find a latest file from any folder by using vb script?
| Is This Answer Correct ? | 1 Yes | 0 No |
HI how can handle dynamic image through vb script example we have to create email id fill the edit box(these latters change wrong password) i am wating your answer
How to copy from one script to another script in qtp
who will create the object?
what is the differenece btwn scripting language and programming language
Explain the scope of the variables using dim, public, and private keywords respectively.
write a vbscrpit to swap values
Mention what is vbscript procedures?
pls tell me which is good book or site for vbscript?
How many types of operators are available in the vbscript language?
I am running a windows based application.While running the script on QTP ,The Application pop-up an Error Message as "object Disabled" in two different scenarios Scenario 1-->The Application pop-up up a Message for Max Session Reached(as the application is set to hold 2 session and if if crosses the pre-defined limit then the error message pop-up) Scenario 2-->When Network connectivity is disabled the Application screen gets greyed out in colour with no operation possible. Now through Exception handling features in QTP ,we need to do the following For Scenarion 1-->Through Exception handling we need to just accept the Message pop-up in the Application and and resume with the call function as is for Scenario 2--> Through Exception Handling featutes on QTP we need to shut down the client , restart the client and resume the call functions as it is Note: The Application returns an Error Message as "object disabled" in both the cases i.e for pop-up message and when the Apllication getting greyed out due to Network failure how can we enhance the script in such a way that for the same error message retured by the application in two different and how to handle them????
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)
What is the differene between QTP 8.2 and QTP 9.0 and QTP 9.1,Pls give me answer ASAP.