Age of a certain file

Dim Args, FS, File, FileName
Set Args = WScript.Arguments
Set FS = CreateObject("Scripting.FileSystemObject")
if WScript.Arguments.Count <> 1 then
WScript.Echo "You must specify a filename"
WScript.Quit(1)
end if
FileName = WScript.Arguments(0)
if not FS.FileExists(FileName) then
WScript.Echo "The specified file does not exist"
WScript.Quit(1)
end if
Set File = FS.GetFile(FileName)
'There are several options for what to output.
'The "h" parameter is hours,and can be changed to e.g. "D" for days or '"n" for minutes. If "n" is used then "min" should be used as unit in custom.conf
'WScript.Echo DateDiff("h", File.DateCreated, Now)
'WScript.Echo DateDiff("n", File.DateLastAccessed, Now)
'WScript.Echo DateDiff("D", File.DateLastModified, Now)
WScript.Echo DateDiff("h", File.DateLastModified, Now)

Our mission

We deliver substantial added value to professional users of enterprise, internet and industrial ICT networks by enabling them to achieve best-practice high availability, stability and security of those networks, and an improved life-cycle management of their IT hardware infrastructures.