Date FSO

Results 1 to 2 of 2

Thread: Date FSO

  1. #1
    Join Date
    Dec 1969

    Default Date FSO

    I’m trying to write out the files that only have a Modified Date of Today based on the modified date = today’s date.<BR><BR>This will return nothing even though there are files with a modified date of today.<BR><BR>Set fso = CreateObject("Scripting.FileSystemObject")<BR>Set folderObject = fso.GetFolder("c:Source")<BR>Set files = folderObject.Files<BR><BR> Response.Write DATE() & "&#060;p&#062;" <BR><BR>For Each file in Files<BR><BR> IF CDATE(file.DateLastModified) = CDATE(DATE()) THEN<BR> Response.Write file.DateLastModified & " -------- " & &"<BR>"<BR> END IF<BR> <BR><BR>Next<BR><BR>Set files = folderObject.Files<BR>Set folderObject = Nothing<BR>Set fso = Nothing<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Date FSO

    The Last Modified date will include a Time as well. This may be causing the problem. Compare just the Date part of DateLastModified with Date() and see what you get.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts