Files_MostRecentN

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)


Public

Tested

My Own Work

InFolder_UnMapPathed, ReturnRecent4Files, FileFilter, Sepa

Returns most recent 6 images from folder /folder2/

Response.Write Files_MostRecentN("/folder2/", 6, "images", "|")

Views 4160 Downloads 1485