Ah yes sorry I didn't know if you were using Windows variables or your own created from the bat file.
The only solution I can think of mate is more variables.
If %temp% exists then theres no need to do more %temp% obviously as they would point back to that directory.
If exists %temp% and %variable1%=1 then etc. (I know the formatting needs a little work but that's my plain english)
Does that help at all?
Probably not - lol