Gets most recent N files from a given folder.
Uses Arrays, and the function ArrSort_2Arr to sort files in descending order by date modified, then grab the top N files into ANStr.
You may decide separator, and number of files, folder should be passed as HTML UnMapPathed folder
If FileFilter = "", all file types will be returned
If FileFIlter starts with "." like ".txt", function will return files with that extension only
If FileFilter = "images", function will return image files only (jpg, png, gif and bmp)
Access to code is limited.
Login here using your Linkedin account. to see or download code.
No registration, not another password to remember, login using your Linkedin account and have access to all public codes in BoldCodes.com
LoginInFolder_UnMapPathed, ReturnRecent4Files, FileFilter, Sepa
Returns most recent 6 images from folder /folder2/
Response.Write Files_MostRecentN("/folder2/", 6, "images", "|")
Response.Write Files_MostRecentN("/folder2/", 6, "images", "|")
Views 4160 Downloads 1485
ArrSort_2Arr
| FSO
| ANStr
| ANString
| ANStrList
| files
| most recent
| recent
| date modified
| filter
| images
| extension
| match