Count Var in Windows Batch
问题 In my batch file I have the following variables: set collection=collection1 set environment=oracleDev set processChain1=-help,-startimport %environment% %collection% As you can see, my process chain contains two strings that are separated with a ",". Now I want to count the two strings (later it could be more then one string). I tried it with: Set count=0 For %%j in (%%processChain1%%) Do Set /A count+=1 echo %count% But there is the first mistake. It prints out 1 and not 2. Why? After