DanielSand
Technical User
I want to check if file date is 30 days older or newer than actual date, i mean for example if today is 29/11/2013 if my file has DateLastModified=20/10/2013 detect that file is older for 30 o more days, but also if a date was manipulated and for example has a newer date than actual date, for example:
DateLastModified=20/10/2015 in this case is newer for 30 o more days.
I have this but is only detect older files, but i couldnt find the way for detect the newer than actual date:
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile("c:\temp\file.txt")
Wscript.Echo "Date created: " & objFile.DateCreated
iDaysOld = 30
If objFile.DateLastModified < (Date() - iDaysOld) Then
Wscript.Echo "File is older o newer than 30 days"
End if
Thanks in advance
DateLastModified=20/10/2015 in this case is newer for 30 o more days.
I have this but is only detect older files, but i couldnt find the way for detect the newer than actual date:
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile("c:\temp\file.txt")
Wscript.Echo "Date created: " & objFile.DateCreated
iDaysOld = 30
If objFile.DateLastModified < (Date() - iDaysOld) Then
Wscript.Echo "File is older o newer than 30 days"
End if
Thanks in advance