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 |
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 are the special sub-types in vbscript?
Explain the arrays in vb script?
create a form to accept username and password validate the username and password with using message box, display the corresponding user message
Which in-built functions are used to convert the specified expression in the form of date and string in the vbscript language?
Anyone have qtp11.0 crack?
I want good books or good sites for scripting.Can any one help me.
reverse the string without using reverse string?
How do you write an SQL insert statement?
Like OPTION EXPLICIT statement what are the other statements used in vbscript and their usage. Please post me all the statements please.
I'm new to QTP, i facing a a problem in the script says"Object not found", "Browser("").page("").frame(Name:=fminfo).webtable(). the issue is, QTp is not able to identify the web table in run time.becuase in that fram"fminfo" there are "n"table and the table do not have the names,Html id. 1) i need to count the number webtables available on that page. 2)need to identify the webtable cell values. 3)How Loop the once i get the count and retrive the cell data of each webtable? Can anyone help on this, plz.. Thanks, Suresh
What is dictionary object in vbscript? Explain?