China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-11 14:04
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Question: How to use a batch file to start a program whose name contains spaces View 788 Replies 3
Original Poster Posted 2009-03-05 12:41 ·  中国 江苏 南京 鹏博士宽带
初级用户
Credits 54
Posts 22
Joined 2007-02-10 02:42
19-year member
UID 79107
Gender Male
Status Offline
Here's an example!
//***********************************//
@echo off
start warkey.exe
start Frozen Thone.exe
//***********************************//
This code won't work; the second start doesn't recognize spaces.
Thanks!
Floor 2 Posted 2009-03-05 12:52 ·  中国 江苏 南京 鹏博士宽带
初级用户
Credits 54
Posts 22
Joined 2007-02-10 02:42
19-year member
UID 79107
Gender Male
Status Offline
I'm really embarrassed. I didn't search carefully myself before bringing it out to ask. I'll try not to make this mistake again next time.
//***********************************//
@echo off
start warkey.exe
start “” “Frozen Thone.exe”
//***********************************//
Thanks to the old posts on the forum!!!!
Floor 3 Posted 2009-03-06 03:27 ·  中国 广东 深圳 联通
新手上路
Credits 2
Posts 1
Joined 2009-02-26 23:03
17-year member
UID 140053
Gender Male
Status Offline
Hehe, I ran into this problem today too. I read a post on the forum, and HAT replied: if there are spaces in the path, you need to add quotes.
That really made me realize it at once!
Floor 4 Posted 2009-03-07 00:17 ·  中国 北京 通州区 联通
中级用户
★★
Credits 256
Posts 133
Joined 2008-09-29 13:30
17-year member
UID 126984
Gender Male
Status Offline
Looks like I'm not the only one who made this mistake, hehe....
Forum Jump: