- Modifying the date and time associated with a file
- Managing the seconds
- Managing errors
- Operating mode in Windows Vista (and later)
- Operating mode in the different operating systems
- Creation time, modification time or access time
- Equivalence
fTime (Function) In french: fHeure Syntax
<Result> = fTime(<File or directory path> [, <New time> [, <Type of time>]])
<Result>: Character string - Time associated with the file or directory (in HHMMSS format),
- Empty string ("") if an error occurred. To find out the error details, use ErrorInfo associated with the errMessage constant.
<File or directory path>: Character string (with quotes) - Name and full (or relative) path of file (up to 260 characters).
- Full (or relative) path of directory (up to 260 characters).
A UNC path can be used. If this parameter corresponds to a directory name, this name may (or may not) end with "\". Versions 15 and later New in version 15 Versions 17 and later New in version 17
<New time>: Optional character string (with quotes) - Modifying a time: new time associated with the specified file or directory (in HHMMSS format),
- Reading a time: empty string ("").
<Type of time>: Optional constant Indicates the time to use: | | fAccess | Time of last access to the file or directory. | fCreation | Time of file/directory creation. | fModify (Default value) | Time of last modification made to the file or directory. |
Remarks All the methods for disk formatting (FAT, NTSF, ...) are not precise to the second. Depending on the method used, fTime may round the time passed in parameter. For example, for a FAT drive, the time for file access has a precision of one day. Therefore, the access time is "000000" and it cannot be modified. fTime generates an error in the following cases: - the specified file is opened or locked by another application,
- the specified file does not exist,
- the name of the specified file is invalid,
- the format of <New time> is incorrect. A WLanguage error occurs if the format of <New time> is incorrect.
- a Unicode string was used for <Path of file or directory> in an operating system such as Windows 98 or Windows Me.
Operating mode in the different operating systems - The time associated with a file or a directory cannot be modified in the following systems: Windows 98, Windows ME.
The different times associated with a directory cannot be modified on a Pocket PC. You cannot find out or modify the creation time associated with a file or with a directory.
This page is also available for…
|
|
|