SetFileDate["file"]
sets the modification and access dates for a file to be the current date.


SetFileDate
SetFileDate["file"]
sets the modification and access dates for a file to be the current date.
Details

- SetFileDate["file",date] sets the modification and access dates to be the specified date.
- The date can be given as a date object or in the date list format as obtained from DateList.
- SetFileDate["file",date,"type"] sets if possible the specified type of date for a file. Types of dates include "Access", "Creation", and "Modification". All represents all types of dates.
- SetFileDate[File["file"]] is also supported.
Examples
open all close allBasic Examples (1)
The date and time at which a file was last modified:
SetFileDate modifies the date of the file to be the current date:
Scope (1)
Set the modification date of the file specified by the File object:
See Also
Tech Notes
Related Guides
History
Introduced in 1991 (2.0) | Updated in 2008 (7.0) ▪ 2016 (11.0)
Text
Wolfram Research (1991), SetFileDate, Wolfram Language function, https://reference.wolfram.com/language/ref/SetFileDate.html (updated 2016).
CMS
Wolfram Language. 1991. "SetFileDate." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/SetFileDate.html.
APA
Wolfram Language. (1991). SetFileDate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SetFileDate.html
BibTeX
@misc{reference.wolfram_2025_setfiledate, author="Wolfram Research", title="{SetFileDate}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/SetFileDate.html}", note=[Accessed: 11-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_setfiledate, organization={Wolfram Research}, title={SetFileDate}, year={2016}, url={https://reference.wolfram.com/language/ref/SetFileDate.html}, note=[Accessed: 11-August-2025]}