Mike...
It ain't perfect, but it will get you started... [Smile]
code:
; test.kix
$Source = "C:\kixtest\source\"
$Target = "C:\kixtest\target\"
$TargetCount = 0
$File = "Test.html"
;
$SourceFileName = Dir($Source,0) ; get the first source file
While $SourceFileName <> "" AND @ERROR = 0 ; loop until done
If $SourceFilename = $File ; if the filename is 'test.html'
;
; get the current count of 'test*.html' files in the target folder
$TargetFileName = Dir($Target,1)
While $TargetFileName <> "" AND @ERROR = 0
If Left($TargetFileName,4) == Left($File,4) AND Right($TargetFileName,4) == Right($File,4)
$TargetCount = $TargetCount + 1
Endif
$TargetFileName = Dir("",1)
Loop
;
; give the source file a new name based on the current file count in the target folder
$NewName = Left($File,4)+Cstr($TargetCount+1)+"."+Right($File,4)
;
; copy the source file to the target folder and then rename it
$Cmdstr='%comspec% /c Rename $Target$File $NewName'
Copy $Source+$File $Target
Shell $Cmdstr
Endif
;
$SourceFileName = Dir("",0) ; get the next source file
Loop
; end of test.kix

_________________________
We all live in a Yellow Subroutine...