(Yes, I notice that the thread has been closed, and marked as solved, and I probably shouldn't barge in, but it seems the original script error has never been addressed, so I must mansplain because that's the obnoxious guy I am.)
Two points:
The error in the script above is that the index used in SetUseNet is wrong.
The indices in the BatchRender element list begin at 0, so the first valid index is 0, and the last is GetElementCount()-1.
dBatchCount starts as GetElementCount(), which is fine as counter, but as an index, it is the first unused index.
Then this counter is increased += 1, so now it is the second unused index after the list.
When AddFile is called with that index, it simply adds the file as last element because it cannot leave empty gaps in the list. It returns True although it didn't use the desired index - it used index-1.
Now SetUseNet is called with the same index. The reason it fails is that this index is not the index that AddFile actually used. This index is not even valid. There is no element with that index. So, nothing happens.
If you use dBatchCount-1 as index at this point, or simply never increase dBatchCount in the first place, the script works fine.
The actual API error is that SetUseNet does not raise an IndexError as the docs claim.
(Other methods like GetElementStatus do.)
Okay, I go annoy someone else now.