Login | |
|
 |
RE: File timestamp check in VBScript - 9/5/2005 7:30:33 AM
|
|
 |
|
| |
Snipah
Posts: 1341
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
|
Hiya, this may be of some help: (not tested by me personally) Option Explicit Dim FSO,File Dim Date1,Date2,Hour1,Hour2 set FSO=CreateObject("Scripting.FileSystemObject") Set File=FSO.GetFile("i:\x.txt") Date1=Now() Date2=File.DateLastModified wscript.echo Date1 wscript.echo Date2 Hour1=DatePart("h",Date1) Hour2=DatePart("h",Date2) wscript.echo Hour1-Hour2,"Hours" wscript.echo DateDiff("h",Date2,Date1),"Hours" wscript.echo DateDiff("n",Date2,Date1),"Minutes" wscript.echo DateDiff("s",Date2,Date1),"Seconds"
_____________________________
For more information, please see the "Read me First" topic. http://www.visualbasicscript.com
|
|
| |
|
|
|
|
|