;================================================================================================
; This function checks the file time and date and updates files if both files are not the same time
;================================================================================================
Function filesametime($Installs, $DestDir, $File, $Value, $Action)
$Value = COMPAREFILETIMES ($Installs + $File, $Destdir + $File)
SELECT
Case $Action = 1 ; copies file if not same time
if $Value <> 0
? "Running Action one"
copy $Installs $DestDir /s
Else Endif
Case $Action = 2 ; remove subdirectory and create new directory and updates only if source file is newer than dest file
if $Value = 1 or $Value = -3
? "Running Action two"
RD $Destdir /S
MD $DestDir
? "Copying Files to Install $ProgorProfile"
copy $Installs $DestDir /s
else endif
ENDSELECT
EndFunction