FileDate

FileDate["file"]

gives the date and time at which a file was last modified.

FileDate["file","type"]

gives information on the specified type of date associated with a file.

Details

  • FileDate returns the date and time as a DateObject.
  • Possible types of dates are:
  • "Access"when the file was last accessed
    "Change"when the file's attributes were last changed
    "Creation"when the file was originally created
    "Modification"when the file was last modified
    "Rules"a list of rules for all types of dates
  • FileDate[File["file"]] is also supported.

Examples

open allclose all

Basic Examples  (1)

The date and time at which a file was last modified:

Convert to the current local date and time:

Scope  (1)

Get the modification time of the file specified by the File object:

Wolfram Research (1991), FileDate, Wolfram Language function, https://reference.wolfram.com/language/ref/FileDate.html (updated 2016).

Text

Wolfram Research (1991), FileDate, Wolfram Language function, https://reference.wolfram.com/language/ref/FileDate.html (updated 2016).

CMS

Wolfram Language. 1991. "FileDate." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/FileDate.html.

APA

Wolfram Language. (1991). FileDate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FileDate.html

BibTeX

@misc{reference.wolfram_2024_filedate, author="Wolfram Research", title="{FileDate}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/FileDate.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_filedate, organization={Wolfram Research}, title={FileDate}, year={2016}, url={https://reference.wolfram.com/language/ref/FileDate.html}, note=[Accessed: 22-November-2024 ]}