Hi All,
I have a web folder "10.1.1.99/view/images/" for example
This folder has images added to it in 30 second spacing.
What I would like is a method to display the latest image from a selected folder.
Sub MostRecentFile(dir As String) As String
Dim latest As String
Dim t As Long = 0
For Each f As String In File.ListFiles(dir)
If Not(File.IsDirectory(dir,f)) Then
If File.LastModified(dir,f)>t Then
latest = f
t = File.LastModified(dir,f)
End If
End If
Next
Return latest
End Sub
that works like a charm if it is a folder on the hard drive. I can do a work-around for this.
The images are being saved into a folder on my Linux server. (10.1.1.99)
I am doing my design on a pc. So I will use an absolute Linux folder.