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 |
Explain about arrays in vb script?
How to write VB script for login module?
Hello Guys, If any body looking for "worksoft certify tool training in bangalore", please contact me aimansaud@gmail.com
write a vb script to find simple interest using functions
What are the advantages of vbscript?
how does vb script help in web page designing? explain with example.
i am having some basic knowledge in c and VB 6.0. i qtp i want to know how to write the codings. by recording it is generating lot of codings. for example i want to test the text box. senerio is text box should not accept alphabets if it accept alphabets we should return fail status if it get number we should return pass status. how to write coding in vb script please help me
How will you get a random number between 0 and 1 in vbscript?
How many data types are supported in Vbscript?
Please let me Know regarding any material regarding VB Scripting which should be easily understandable for Beginners.
Hi anyone Can Send Solution to the Question wt m posting now Prepare Script for the Bellow Scenario? Login to Gmail Page Open Inbox check Mails save them in a Folder
what is fire event method in qtp?