Well I guess I have to answer my own question.
Q DELAY 500Q STRING for %d in (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z) do if exist %d:/payload/switch1/test.exe (start %d:/payload/switch1/test.exe & exit)Q ENTER
Problem was: Double quotes are missing:
Q DELAY 500Q STRING "for %d in (A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z) do if exist %d:/payload/switch/test.exe (start %d:/payload/switch/test.exe & exit)"Q ENTER
And now it runs smoothly.
Thanks to myself.