Code: Select all
@echo %*
Code: Select all
start "Title" test.bat First Second
Code: Select all
start "Title" test.bat "First >" "Second |"
Code: Select all
start "Title" "test.bat" First Second
Code: Select all
start "Title" "test.bat" "First" "Second"
Code: Select all
"test.bat" "First" "Second" is not recognized as an external or internal command, etc...
Code: Select all
start "Title" cmd /K ""test.bat" "First" "Second""
However, if I include the special characters in the parameters:
Code: Select all
start "Title" cmd /K ""test.bat" "First >" "Second |""
![Sad :(](./images/smilies/icon_sad.gif)
After several tests I discovered that the only way to include special characters in the parameters in this way is escaping the special characters:
Code: Select all
start "Title" cmd /K ""test.bat" "First ^>" "Second ^|""
![Confused :?](./images/smilies/icon_confused.gif)
![Arrow :arrow:](./images/smilies/icon_arrow.gif)
Ok. If the problem is the characters included in the parameters, then just eliminate the parameters. I changed the test.bat file for this line:
Code: Select all
@echo %parameters%
Code: Select all
set parameters="First >" "Second |"
start "Title" cmd /K "test.bat"
===================================================================================
Ok. Lets pass now to the second problem. I want that the parameters include extended (beyond ASCII 127) characters:
Code: Select all
set parameters="ÇüéâäàåçêëèïîìÄÅ" "áíóúñÑ¿¡"
start "Title" cmd /K "test.bat"
Code: Select all
@echo off
set parameters="ÇüéâäàåçêëèïîìÄÅ" "áíóúñÑ¿¡"
start "Title" cmd /K "test.bat"
Code: Select all
"├ç├╝├®├ó├ñ├á├Ñ├º├¬├½├¿├»├«├¼├ä├à" "├í├¡├│├║├▒├æ┬┐┬í"
So I saved both files with ANSI encoding and checked that the characters in second.bat file be correct. Anyway, the characters shown ARE NOT THE SAME!
![Shocked :shock:](./images/smilies/icon_eek.gif)
Code: Select all
"óÚÔõÓÕþÛÙÞ´¯ý─┼" "ßݾ·±Ð┐í"
![Arrow :arrow:](./images/smilies/icon_arrow.gif)
Antonio