FILE_SetDateTime

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > File > FILE: functions working on files >

FILE_SetDateTime

 

Description

 

The File_SetDateTime() function sets a new date and time for a giving file.

 

Syntax

 

n = File_SetDateTime(sFile, sDate, sTime, nChoice)

 

Returns

 

Returns a number

Nonzero value if the file date and time was successfully changed.

Zero if the function fails.

 

Parameters

 

Name

Type

Optional

Meaning

sFile

String

No

The full path of the file you want the Date

sDate

String

No

The new date to set, if empty current date is used.

sTime

String

No

The new time to set, if empty current time is used.

nChoice

String

No

Specify witch date to be setted, could be one or a combination of following values:

%DATE_TIME_FILE_CREATION

%DATE_TIME_LAST_FILE_ACCESS

%DATE_TIME_LAST_FILE_WRITE

 

Remarks

 

Restrictions

 

New date string format must be "mm-dd-yyyy" or "mm-dd-yy".

 

See also

 

File_GetDate, File_GetTime

 

Examples

 

File_SetDateTime( _

"c:\windows\notepad.exe", _

"07-23-2005", _

"22:00:00", _

%DATE_TIME_FILE_CREATION Or %DATE_TIME_LAST_FILE_WRITE _

)