Below VB Script is giving me wrong result when I add two variables, can someone point out to me where am I doing wrong please.
I'm splitting data into batches and need the count for each file

Option explicit

Dim strCurrentCounter, strBatchCounter, strNewCounter
strCurrentCounter = Watch.GetVariable("Count")
strBatchCounter = Watch.GetVariable("BatchCount")
strNewCounter = strCurrentCounter + strBatchCounter
Watch.SetVariable "Count", strNewCounter

if I have Count = 6, BatchCount = 6 result should be 12 but it gives me 66, cause it's not recognizing it's numeric, it's taking is as text I guess, how can I fix this?

Edited by Sami786 (09/25/20 02:17 PM)