How to loop through array in batch?

Another Alternative using defined and a loop that doesn’t require delayed expansion: set Arr[0]=apple set Arr[1]=banana set Arr[2]=cherry set Arr[3]=donut set “x=0” :SymLoop if defined Arr[%x%] ( call echo %%Arr[%x%]%% set /a “x+=1″ GOTO :SymLoop ) Be sure you use “call echo” as echo won’t work unless you have delayedexpansion and use ! instead of … Read more

Google Apps Script – Label Email Based On Email Body [Optimize Code]

One method of improving performance in nested loop situations – especially duplicate identification – is to store a record of traversed content, rather than repeatedly comparing. For example, you could hash the message body (given the right hash function) and store the hashes as object properties. Note that there is no formal limit on the … Read more