Eric -
I will have a go at this. I recommend building an array to store values. This example uses all your data except file names (I was lazy, okay?). Check it out and see if this helps. Confirm the display portions show array values properly - you may need to substitue a variable here within the DO/UNTIL structure, something like $TmpSrc = $SrcFil[$y].

Bill

PS: Noticed logic issue - if file not on the SERVER no bypass mechanism in place, so copy attempt still made from your script and this array example.


code:

BREAK OFF
IF EXIST ("C:\Jdaodbms\Project") <> 1 RETURN ENDIF


$location = "C:\Jdaodbms\Project"
$serverpath = "@LSERVER\NETLOGON\UPDATES\GIS"
$imagefile = "C:\Jdaodbms\Images"
$backupdir = "$location\Backup"


; REM ** Create array to store values, and an increment variable to track values
DIM $DstFil[10]
DIM $SrcFil[10]
$x = 0


$DstFil[$x] = "$location\File1" $SrcFile[$x] = "$serverpath\File1" $x=$x+1
$DstFil[$x] = "$location\File2" $SrcFile[$x] = "$serverpath\File2" $x=$x+1
$DstFil[$x] = "$location\File3" $SrcFile[$x] = "$serverpath\File3" $x=$x+1
$DstFil[$x] = "$location\File4" $SrcFile[$x] = "$serverpath\File4" $x=$x+1
$DstFil[$x] = "$location\File5" $SrcFile[$x] = "$serverpath\File5" $x=$x+1
$DstFil[$x] = "$location\File6" $SrcFile[$x] = "$serverpath\File6" $x=$x+1
$DstFil[$x] = "$location\File7" $SrcFile[$x] = "$serverpath\File7" $x=$x+1
$DstFil[$x] = "$location\File8" $SrcFile[$x] = "$serverpath\File8" $x=$x+1
$DstFil[$x] = "$location\File9" $SrcFile[$x] = "$serverpath\File9" $x=$x+1
$DstFil[$x] = "$location\File10" $SrcFile[$x] = "$serverpath\File10" $x=$x+1


$y = 0


DO
$DST = GETFILETIME ($DstFil[$y])
IF (@error <> 0) $Prompt = "File not present on client: " +@serror Gosub "CENTER" ENDIF
$SRC = GETFILETIME ($SrcFil[$y])
IF (@error <> 0) $Prompt = "File not present on server: " +@serror Gosub "CENTER" ENDIF


IF ($DST <> $SRC) ; is $DstFil not the same as $SrcFil
$Prompt = "Copying file... $SrcFil[$y]" Gosub "CENTER"
$Prompt = " " Gosub "CENTER"
COPY "$DstFil[$y]" "$backupdir" ; Make a backup from Original
COPY "$SrcFil[$y]" "$location" ; Copy the new FileENDIF
ENDIF


$y=$y+1
UNTIL $x=$y


$Prompt = "All your files are up to date...!"
Gosub "CENTER"
SLEEP 1
$Prompt = " "
Gosub "CENTER"
RETURN


:CENTER
$YCordinate = 40 - ( Len ( $Prompt ) / 2 )
Color N/N
Box ( 22, 1, 24, 78, DOUBLE ) ; erase the bar
Color W/NAt ( 23, $YCordinate )
$PromptSleep 1
Return


[ 18 July 2001: Message edited by: bleonard ]