Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oNewestFile = Nothing
sFolder = "C:\Temp\"
If oFSO.FolderExists(sFolder) Then
For Each oFile In oFSO.GetFolder(sFolder).Files
If oNewestFile Is Nothing Then
Set oNewestFile = oFile
Else
If oNewestFile.DateCreated < oFile.DateCreated Then
Set oNewestFile = oFile
End If
End If
Next
End If
If oNewestFile IsNot Nothing Then
WScript.Echo oNewestFile.Name & " " & oNewestFile.DateCreated
End If
Set objFSO = CreateObject("Scripting.FileSystemObject")
FolderToScan = "C:\"
Set objFolder = objFSO.GetFolder(FolderToScan)
NewestFile = ""
NewestDate = #1/1/1970#
For Each objFile In objFolder.Files
If objFile.DateLastModified > NewestDate Then
NewestDate = objFile.DateLastModified
NewestFile = objFile.Name
End If
Next
WScript.Echo NewestFile