adeptdeveloper
08/21/2024, 3:36 PMneokoenig
08/21/2024, 3:42 PMdirectoryList("/var/data", false, "path", function(path){ return arguments.path.hasSuffix(".log"); })
neokoenig
08/21/2024, 3:42 PMarguments
which would help you filter)adeptdeveloper
08/21/2024, 3:46 PMaliaspooryorik
adeptdeveloper
08/21/2024, 3:50 PMaliaspooryorik
var x = files.filter( (el) => isDate(el.DateLastModified ) );
is how you'd filter it https://cfdocs.org/queryfilteraliaspooryorik
aliaspooryorik
Jason Roozee
08/21/2024, 4:03 PMadeptdeveloper
08/21/2024, 4:09 PMaliaspooryorik
adeptdeveloper
08/21/2024, 4:14 PMaliaspooryorik
jakobward
08/21/2024, 4:27 PMCFEXECUTE
to issue a command using your OS, such as find
on Linux or PowerShell
on Windows, to filter files by date before processing them in ColdFusion.Adam Cameron
Adam Cameron
Adam Cameron
cfsimplicity
08/21/2024, 4:42 PMAgeFileFilter
java object (as mentioned by John and which implements FileFilter
) to DirectoryList()
as a filter function. Not sure if it will be faster but it should limit what's added to the query.
sixtyDaysAgo = Now().Add( "d", -60 )
ageFileFilter = CreateObject( "java", "org.apache.commons.io.filefilter.AgeFileFilter" ).init( sixtyDaysAgo )
result = DirectoryList( folderPath, false, "query", ageFileFilter )
adeptdeveloper
08/21/2024, 4:45 PMAdam Cameron
Adam Cameron
denny
08/21/2024, 5:38 PMadeptdeveloper
08/21/2024, 7:34 PM