|
Action |
Compares the date and time of two files.
|
Syntax |
COMPAREFILETIMES ("file1", "file2")
|
Parameter |
File1
Identifies the first file you want to compare.
File2
Identifies the second file you want to compare.
|
Returns |
|
-3 |
File2 could not be opened (see @ERROR for more information). |
|
-2 |
File1 could not be opened (see @ERROR for more information). |
|
-1 |
File1 is older than file2. |
|
0 |
File1 and file2 have the same date and time. |
|
1 |
File1 is more recent than file2. |
|
Example |
$Result = CompareFileTimes(@LDRIVE +
"\USER.INI", "C:\WINDOWS\USER.INI")
IF $Result = 1 OR $Result = -3
COPY
@LDRIVE + "\USER.INI" "C:\WINDOWS\USER.INI"
ENDIF