Jochen,
Interesting project you have on the back burner. The first thing I thought was... no way... the RoboCopy log file would hold at zero bytes until complete... I was WRONG. The log file updates incrementally so theoretically you could rip the percentages. They are quite coarse however.

I added milliseconds to the calculation for faster links or smaller files or just better precision.

code:

BREAK ON
CLS
"Hit any key for start time snapshot"
?
Get $
$Start=@Time+"."+@Ticks
"$$Start = "+$Start

; get milliseconds (actual value not significant except to subtract from $endmsecs)
$startmsecs=val(substr($start,10,Len($start)))
?
"Milliseconds to substract from end time = "+$startmsecs
?
?
"Hit any key for end time snapshot"
?
Get $
$End=@Time+"."+@Ticks
"$$End = "+$End

; get milliseconds (only net value significant)
$endmsecs=val(substr($end,10,Len($end)))
?
"Milliseconds to substract start time from = "+$endmsecs
?
?
; convert start time to seconds
$startsecs=val(substr($start, 1, 2))*3600 + val(substr($start, 4, 2))*60 + val(substr($start, 7, 2))
"$$Startsecs= "+$Startsecs+" seconds from midnight"
?
; convert end time to seconds
$endsecs=val(substr($end,1,2))*3600+val(substr($end,4,2))*60+val(substr($end,7,2))
"$$Endsecs = "+$Endsecs+" seconds from midnight"
?
; subtract start from end milliseconds
$diffmsecs=$endmsecs-$startmsecs
?
"Total $$Diffmsecs = "+$Diffmsecs+" milliseconds"

; drop the seconds (keep only the last three places)
$diffmsecs=val(substr($diffmsecs,Len($diffmsecs)-2,Len($diffmsecs)))

; subtract start from end
$diffsecs=$endsecs-$startsecs
?
"$$Diffsecs = "+$Diffsecs+" seconds"+" and "+$Diffmsecs+" milliseconds"

; convert difference to HH:MM:SS
$hours=$diffsecs/3600
$minutes=($diffsecs-($hours*3600))/60
$seconds=($diffsecs-($hours*3600)-($minutes*60))

; convert the numbers to strings and add leading zeros if required

if $hours<10
$hours="0$hours"
else
$hours="$hours"
endif

if $minutes<10
$minutes="0$minutes"
else
$minutes="$minutes"
endif

if $seconds<10
$seconds="0$seconds"
else
$seconds="$seconds"
endif

; create string
$diff=$hours+":"+$minutes+":"+$seconds
?
"$$Diff = "+$Diff+" in HH:MM:SS format"

Get $


_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.