CT_SETFDATI

 SETFDATI()
 Sets the date and time of a file

 Syntax

     SETFDATI(<cFile>, [<dFileDate>], [<cFileTime>]) --> lAmended

 Arguments

     <cFile>  Designates for which file the date and/or time is changed.
     Drive and path designations are possible, wildcards are not.

     <dFileDate>  Designates the date for the file.  The default is the
     system date.

     <cFileTime>  Designates the time for the file.  The default is the
     system time.

 Returns

     SETFDATI() returns .T. when the change is successfully executed.

 Description

     SETFDATI() permits you to set the clock date and time of a file.  Since
     the date and time of a file usually change at the same time, these have
     been brought together in one function.  It is possible to only change
     the time or the date, when one parameter is given and the other is not.
     The different parameter types tell the function what is to change.

 Note

     .  The time is given in a 24-hour format, that is between
        "00:00:00" and "23:59:59".

 Examples

     .  Set the date and time:

        SETFDATI("C:\TEXT\TEST.TXT", CTOD("01/01/91"), "01:10:00")

     .  Set current date and time:

        SETFDATI("TEST.TXT")                  // DATE() + TIME()

     .  Only change the date:

        SETFDATI("TEST.TXT", DATE() -10)      // Ten days prior to today

     .  Only change the time, resetting to start time:

        SETFDATI("TEST.TXT", SECTOTIME(Start))

See Also: FILESEEK() FILEDATE() FILETIME() SECTOTIME()

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.