string - how to pass a complex chain as an argument to a batch 'index1','index2','index3' -


i want pass string 'index1','index2','index3' batch

test2.cmd 1 'index1','index2','index3' 3 

and if test2.cmd

echo %1 echo %2 echo %3 

i'd see

echo 1 echo 'index1','index2','index3' echo 3 

but not work... cause see

echo 1 echo'index1' echo 'index2' 

how can fix please?

just enclose string in double quotes:

test2.cmd 1 "'index1','index2','index3'" 3 

edit answer comment:

also change test2.cmd

echo %1 echo %~2 echo %3 

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -