; ***********************************************************************
; ** GIS Updates
; ***********************************************************************
BREAK OFFIF EXIST ("C:\Jdaodbms\Project") = 1 GOTO MAIN
ELSE
GOTO END
ENDIF
:MAIN
$location = "C:\Jdaodbms\Project"
$serverpath = "@LSERVER\NETLOGON\UPDATES\GIS"
$imagefile = "C:\Jdaodbms\Images"
$backupdir = "$location\Backup"
IF EXIST ("$backupdir") = 0 MD ("$backupdir") ENDIF
; **********************************************************************************
; ** Destination locations
; **********************************************************************************
$filename1a = "$location\buyu0194.frm"
$filename1b = "$location\finq0008.frm"
$filename1c = "$location\basu0060.frm"
$filename1d = "$location\basu0062.frm"
$filename1e = "$location\basu0201.frm"
$filename1f = "$location\blk_m0001.frm"
$filename1g = "$location\blk_q0001.frm"
$filename1h = "$location\blk_q0002.frm"
$filename1i = "$location\blk_u0001.frm"
$filename1j = "$location\blk_u0002.frm"
$filename1k = "$location\blk_u0003.frm"
$filename1l = "$location\bass0089.frm"
$filename1m = "$location\capq0003.frm"
$filename1n = "$imagefile\blokker1.bmp"
; **********************************************************************************
; ** Source locations
; **********************************************************************************
$filename2a = "$serverpath\buyu0194.frm"
$filename2b = "$serverpath\finq0008.frm"
$filename2c = "$serverpath\basu0060.frm"
$filename2d = "$serverpath\basu0062.frm"
$filename2e = "$serverpath\basu0201.frm"
$filename2f = "$serverpath\blk_m0001.frm"
$filename2g = "$serverpath\blk_q0001.frm"
$filename2h = "$serverpath\blk_q0002.frm"
$filename2i = "$serverpath\blk_u0001.frm"
$filename2j = "$serverpath\blk_u0002.frm"
$filename2k = "$serverpath\blk_u0003.frm"
$filename2l = "$serverpath\bass0089.frm"
$filename2m = "$serverpath\capq0003.frm"
$filename2n = "$serverpath\blokker1.bmp"
; **********************************************************************************
$result1a = GETFILETIME ($filename1a)
IF (@error <> 0) $Prompt = "File not present on client: " +@serror Gosub "CENTER" ENDIF
$result2a = GETFILETIME ($filename2a)
IF (@error <> 0) $Prompt = "File not present on server: " +@serror Gosub "CENTER" ENDIF
IF ($Result2a <> $Result1a) ; is $filename1a not the same as $filename2a
$Prompt = "Copying file... $filename2a" Gosub "CENTER"
$Prompt = " " Gosub "CENTER"
COPY $filename1a $backupdir ; Make a backup from Original
COPY $filename2a $location ; Copy the new File
ENDIF
; **********************************************************************************
$result1b = GETFILETIME ($filename1b)
IF (@error <> 0) $Prompt = "File not present on client: " +@serror Gosub "CENTER" ENDIF
$result2b = GETFILETIME ($filename2b)
IF (@error <> 0) $Prompt = "File not present on server: " +@serror Gosub "CENTER" ENDIF
IF ($Result2b <> $Result1b)
$Prompt = "Copying file... $filename2b" Gosub "CENTER"
$Prompt = " " Gosub "CENTER"
COPY $filename1b $backupdir
COPY $filename2b $location
ENDIF
; **********************************************************************************
$result1c = GETFILETIME ($filename1c)
IF (@error <> 0) $Prompt = "File not present on client: " +@serror Gosub "CENTER" ENDIF
$result2c = GETFILETIME ($filename2c)
IF (@error <> 0) $Prompt = "File not present on server: " +@serror Gosub "CENTER" ENDIF
IF ($Result2c <> $Result1c)
$Prompt = "Copying file... $filename2c" Gosub "CENTER"
$Prompt = " " Gosub "CENTER"
COPY $filename1c $backupdir
COPY $filename2c $location
ENDIF
; **********************************************************************************
$result1d = GETFILETIME ($filename1d)
IF (@error <> 0) $Prompt = "File not present on client: " +@serror Gosub "CENTER" ENDIF
$result2d = GETFILETIME ($filename2d)
IF (@error <> 0) $Prompt = "File not present on server: " +@serror Gosub "CENTER" ENDIF
IF ($Result2d <> $Result1d)
$Prompt = "Copying file... $filename2d" Gosub "CENTER"
$Prompt = " " Gosub "CENTER"
COPY $filename1d $backupdir
COPY $filename2d $location
ENDIF
; **********************************************************************************
$result1e = GETFILETIME ($filename1e)
IF (@error <> 0) $Prompt = "File not present on client: " +@serror Gosub "CENTER" ENDIF
$result2e = GETFILETIME ($filename2e)
IF (@error <> 0) $Prompt = "File not present on server: " +@serror Gosub "CENTER" ENDIF
IF ($Result2e <> $Result1e)
$Prompt = "Copying file... $filename2e" Gosub "CENTER"
$Prompt = " " Gosub "CENTER"
COPY $filename1e $backupdir
COPY $filename2e $location
ENDIF
; **********************************************************************************
$result1f = GETFILETIME ($filename1f)
IF (@error <> 0) $Prompt = "File not present on client: " +@serror Gosub "CENTER" ENDIF
$result2f = GETFILETIME ($filename2f)
IF (@error <> 0) $Prompt = "File not present on server: " +@serror Gosub "CENTER" ENDIF
IF ($Result2f <> $Result1f)
$Prompt = "Copying file... $filename2f" Gosub "CENTER"
$Prompt = " " Gosub "CENTER"
COPY $filename1f $backupdir
COPY $filename2f $location
ENDIF
; **********************************************************************************
$result1g = GETFILETIME ($filename1g)
IF (@error <> 0) $Prompt = "File not present on client: " +@serror Gosub "CENTER" ENDIF
$result2g = GETFILETIME ($filename2g)
IF (@error <> 0) $Prompt = "File not present on server: " +@serror Gosub "CENTER" ENDIF
IF ($Result2g <> $Result1g)
$Prompt = "Copying file... $filename2g" Gosub "CENTER"
$Prompt = " " Gosub "CENTER"
COPY $filename1g $backupdir
COPY $filename2g $location
ENDIF
; **********************************************************************************
$result1h = GETFILETIME ($filename1h)
IF (@error <> 0) $Prompt = "File not present on client: " +@serror Gosub "CENTER" ENDIF
$result2h = GETFILETIME ($filename2h)
IF (@error <> 0) $Prompt = "File not present on server: " +@serror Gosub "CENTER" ENDIF
IF ($Result2h <> $Result1h)
$Prompt = "Copying file... $filename2h" Gosub "CENTER"
$Prompt = " " Gosub "CENTER"
COPY $filename1h $backupdir
COPY $filename2h $location
ENDIF
; **********************************************************************************
$result1i = GETFILETIME ($filename1i)
IF (@error <> 0) $Prompt = "File not present on client: " +@serror Gosub "CENTER" ENDIF
$result2i = GETFILETIME ($filename2i)
IF (@error <> 0) $Prompt = "File not present on server: " +@serror Gosub "CENTER" ENDIF
IF ($Result2i <> $Result1i)
$Prompt = "Copying file... $filename2i" Gosub "CENTER"
$Prompt = " " Gosub "CENTER"
COPY $filename1i $backupdir
COPY $filename2i $location
ENDIF
; **********************************************************************************
$result1j = GETFILETIME ($filename1j)
IF (@error <> 0) $Prompt = "File not present on client: " +@serror Gosub "CENTER" ENDIF
$result2j = GETFILETIME ($filename2j)
IF (@error <> 0) $Prompt = "File not present on server: " +@serror Gosub "CENTER" ENDIF
IF ($Result2j <> $Result1j)
$Prompt = "Copying file... $filename2j" Gosub "CENTER"
$Prompt = " " Gosub "CENTER"
COPY $filename1j $backupdir
COPY $filename2j $location
ENDIF
; **********************************************************************************
$result1k = GETFILETIME ($filename1k)
IF (@error <> 0) $Prompt = "File not present on client: " +@serror Gosub "CENTER" ENDIF
$result2k = GETFILETIME ($filename2k)
IF (@error <> 0) $Prompt = "File not present on server: " +@serror Gosub "CENTER" ENDIF
IF ($Result2k <> $Result1k)
$Prompt = "Copying file... $filename2k" Gosub "CENTER"
$Prompt = " " Gosub "CENTER"
COPY $filename1k $backupdir
COPY $filename2k $location
ENDIF
; **********************************************************************************
$result1l = GETFILETIME ($filename1l)
IF (@error <> 0) $Prompt = "File not present on client: " +@serror Gosub "CENTER" ENDIF
$result2l = GETFILETIME ($filename2l)
IF (@error <> 0) $Prompt = "File not present on server: " +@serror Gosub "CENTER" ENDIF
IF ($Result2l <> $Result1l)
$Prompt = "Copying file... $filename2l" Gosub "CENTER"
$Prompt = " " Gosub "CENTER"
COPY $filename1l $backupdir
COPY $filename2l $location
ENDIF
; **********************************************************************************
$result1m = GETFILETIME ($filename1m)
IF (@error <> 0) $Prompt = "File not present on client: " +@serror Gosub "CENTER" ENDIF
$result2m = GETFILETIME ($filename2m)
IF (@error <> 0) $Prompt = "File not present on server: " +@serror Gosub "CENTER" ENDIF
IF ($Result2m <> $Result1m)
$Prompt = "Copying file... $filename2m" Gosub "CENTER"
$Prompt = " " Gosub "CENTER"
COPY $filename1m $backupdir
COPY $filename2m $location
ENDIF
; **********************************************************************************
$result1n = GETFILETIME ($filename1n)
IF (@error <> 0) $Prompt = "File not present on client: " +@serror Gosub "CENTER" ENDIF
$result2n = GETFILETIME ($filename2n)
IF (@error <> 0) $Prompt = "File not present on server: " +@serror Gosub "CENTER" ENDIF
IF ($Result2n <> $Result1n)
$Prompt = "Copying file... $filename2n" Gosub "CENTER"
$Prompt = " " Gosub "CENTER"
COPY $filename1n $backupdir
COPY $filename2n $imagefile
ELSE
$Prompt = "All your files are up to date...!"
Gosub "CENTER"
SLEEP 1
$Prompt = " "
Gosub "CENTER"
ENDIF
GOTO END
; **********************************************************************************
:CENTER
$YCordinate = 40 - ( Len ( $Prompt ) / 2 )
Color N/N
Box ( 22, 1, 24, 78, DOUBLE ) ; erase the bar
Color W/N
At ( 23, $YCordinate ) $Prompt
Sleep 1
Return
;************************************************************
:END
Return