I have a batch file that I've thrown together in order to automate the launching of a program and several associated programs in a single click. The part relevant to the question:
echo Starting FireFox with Elite Tabset...
cd "C:\Program Files\Mozilla Firefox\"
start firefox.exe ^
https://inara.cz/cmdr/276665/ https://coriolis.io/ ^
https://www.edsm.net/ ^
http://www.elitedangeroustrading.com/trade-assistant.aspx ^
https://www.edtutorials.com/ ^
"file:///C:/Program Files (x86)/VoiceAttack/Sounds/HCS Tools/Links and docs/Control packs/Singularity (Elite)/Singularity reference guide.pdf" "file:///C:/Program Files (x86)/VoiceAttack/Sounds/HCS Tools/Links and docs/Companion packs/Ships assistant Ad-Astra/Ad-Astra reference guide.pdf" "file:///C:/Program Files (x86)/VoiceAttack/Sounds/HCS Tools/.Voice command lists/Elite Dangerous Voice Commands/Singularity ship commands.html" "file:///C:/Users/Guillermo/Downloads/ebonym-t16000mfcs.jpg"
echo Starting EDDiscovery...
As you can see, I've used the ^
character to break the start firefox
command into multiple lines for readability's sake. This file, as shown, works. However, note the 2nd-to-last line, which starts with "file:///
". There are multiple parameters on that line. What I tried to do is:
echo Starting FireFox with Elite Tabset...
cd "C:\Program Files\Mozilla Firefox\"
start firefox.exe ^
https://inara.cz/cmdr/276665/ https://coriolis.io/ ^
https://www.edsm.net/ ^
http://www.elitedangeroustrading.com/trade-assistant.aspx ^
https://www.edtutorials.com/ ^
"file:///C:/Program Files (x86)/VoiceAttack/Sounds/HCS Tools/Links and docs/Control packs/Singularity (Elite)/Singularity reference guide.pdf" ^
"file:///C:/Program Files (x86)/VoiceAttack/Sounds/HCS Tools/Links and docs/Companion packs/Ships assistant Ad-Astra/Ad-Astra reference guide.pdf" ^
"file:///C:/Program Files (x86)/VoiceAttack/Sounds/HCS Tools/.Voice command lists/Elite Dangerous Voice Commands/Singularity ship commands.html" ^
"file:///C:/Users/Guillermo/Downloads/ebonym-t16000mfcs.jpg"
echo Starting EDDiscovery...
When I do that, I get the below output:
C:\Program Files (x86)\VoiceAttack>echo Starting FireFox with Elite Tabset... Starting FireFox with Elite Tabset... C:\Program Files (x86)\VoiceAttack>cd "C:\Program Files\Mozilla Firefox\" C:\Program Files\Mozilla Firefox>start firefox.exe https://inara.cz/cmdr/276665/ >https://coriolis.io/ https://www.edsm.net/ http://www.elitedangeroustrading.com/trade-assistant.aspx https://www.edtutorials.com/ "file:///C:/Program Files (x86)/VoiceAttack/Sounds/HCS Tools/Links and docs/Control packs/Singularity (Elite)/Singularity reference guide.pdf" ^ C:\Program Files\Mozilla Firefox>"file:///C:/Program Files (x86)/VoiceAttack/Sounds/HCS Tools/Links and docs/Companion packs/Ships assistant Ad-Astra/Ad-Astra reference guide.pdf" "file:///C:/Program Files (x86)/VoiceAttack/Sounds/HCS Tools/.Voice command lists/Elite Dangerous Voice Commands/Singularity ship commands.html" ^ The filename, directory name, or volume label syntax is incorrect. C:\Program Files\Mozilla Firefox>"file:///C:/Users/Guillermo/Downloads/ebonym-t16000mfcs.jpg" The filename, directory name, or volume label syntax is incorrect. C:\Program Files\Mozilla Firefox>echo Starting EDDiscovery... Starting EDDiscovery...
I don't understand why I am able to separate the first 4 arguments out, but not the ones that start with "file://
. Is there some subtle facet of the ^
I am missing or mis-using? Is there a different technique for this kind of cleanup? I acknowledge that it is purely a readability concern, but it is vexing to not be able to explain this behavior.