# AG\_FILETIMES
> [HTML Version](ag_filetimes.htm)
_Reviewed and revised December 2023_
**tab(-10, AG\_FILETIMES); fspec, opcode \{,loc'rem, mtime, ctime, atime\}; chr(127);** [Tab(-10,x) Syntax Notes](ag_xxx_syntax-notes.htm.md)
AG\_FILETIMES (113) provides a way to set a file's last modification time (_mtime_), creation time (_ctime_), and/or last access time (_atime_). Setting the mtime of a file is equivalent in the Unix world to using the touch command on the file. For convenience, the function can also retrieve the file times, overlapping functionality already provided by [MX\_FILESTATS](mx_filestats.htm.md)[xs](keyword-types.htm.md).
This function has both a [subroutine and a print tab implementation](subroutine-print-pairs.htm.md).
**Parameters**
_fspec_
file spec (client perspective) to get or set times for
_opcode_
0 = get (MXOP\_GET) or 1 = set (MXOP\_sET)
_loc'rem_
C to check cache directories, else _fspec_ must be fully qualified
_mtime, ctime, atime_
modify, create, and access times to set (opcode 1), in seconds since the epoch.
**Response**
_status, mtime, ctime, atime_ CR
_status_ is 0 for success, else a Windows error code. Times are seconds since the epoch.
**Comments**
Note that access time isn't uniformly supported across Windows systems.
**See Also**
• [MX\_FILETIMES](mx_filetimes.htm.md)[xs](keyword-types.htm.md)
• [MX\_FTFORMAT](mx_ftformat.htm.md)[xs](keyword-types.htm.md)[ ](mx_ftformat.htm.md)to convert time values into human-readable form
**History**
2023 August, A-Shell 6.5.1740: Function added to A-Shell