![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Pop up message if a file is older than... Hi, In a vbs logon script I need to pop up a small message if a certain file is older than a certain date or a certain size. How do I do that in vbs...? Thanks for tips on this regards jake |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Pop up message if a file is older than... "Jake" <jake44@xxxxxx> wrote in message news:OHCYDo6dJHA.3520@xxxxxx Quote: > Hi, > > In a vbs logon script I need to pop up a small message if a certain file > is older than a certain date or a certain size. How do I do that in > vbs...? > > Thanks for tips on this > > regards > > jake every few hours then you could use the Task Scheduler to invoke a small VB Script to check the file size. If you want the file to be checked permanently, e.g. every 10 seconds, then a WMI solution would be more appropriate. This will, of course, load up your CPU. |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Pop up message if a file is older than... On Jan 16, 1:14*am, Jake <jak...@xxxxxx> wrote: Quote: > Hi, > > In a vbs logon script I need to pop up a small message if a certain file > is older than a certain date or a certain size. *How do I do that in vbs...? > > Thanks for tips on this > > regards > > jake Dim fil Dim sFileName Dim iFileSize Dim iFileModDate sFileName = "C:\Test\Test.txt" iFileSize = 1 'in bytes iFileModDate = #1/1/2000# Set fso = CreateObject("scripting.filesystemobject") Set fil = fso.GetFile(sFileName) If fil.Size> iFileSize Or fil.DateLastModified> iFileModDate Then MsgBox "File Name: " & fil.Name & vbCrLf & _ "File Size in Bytes: " & fil.Size & vbCrLf & _ "Date Last Modified: " & fil.DateLastModified End If |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| file delete message | General Discussion | |||
| accidently replace file with older version | Vista file management | |||
| coping file from a remote file share - FILE IS NO LONG THERE bogus error message | Vista networking & sharing | |||
| Can't find the file specified message | Vista General | |||
| File burn message | Vista General | |||