FileDate
FileDate["file"] gives the date and time the file was last modified.
FileDate["file", "type"] gives info on the specified date type.
Examples
Get modification date:
FileDate["myfile.txt"]
(* DateObject[{2024, 1, 15, 14, 30, 0}] *)Get creation date:
FileDate["myfile.txt", "Creation"]Please visit the official Wolfram Language Reference for more details.