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-02 10:22
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to write "open a certain file with a specified program"? View 1,521 Replies 9
Original Poster Posted 2006-11-09 09:03 ·  中国 安徽 芜湖 电信
高级用户
★★
Credits 537
Posts 219
Joined 2006-10-31 21:08
19-year member
UID 69036
Gender Male
From 芜湖
Status Offline
Now there is 1.mp3.
I want to use 1.exe to open it.

Because if I directly open 1.mp3, it will be opened with my default player.
I want to open it with Qianqian Jingting.......
I don't know if it will work.
Floor 2 Posted 2006-11-09 09:09 ·  中国 甘肃 甘南藏族自治州 合作市 电信
金牌会员
★★★★
Credits 4,103
Posts 1,744
Joined 2006-01-20 13:00
20-year member
UID 49241
Gender Male
From 甘肃.临泽
Status Offline
Set file association
Assoc /?
Ftype /?
Floor 3 Posted 2006-11-09 09:12 ·  中国 安徽 芜湖 电信
高级用户
★★
Credits 537
Posts 219
Joined 2006-10-31 21:08
19-year member
UID 69036
Gender Male
From 芜湖
Status Offline
Is it about setting file associations? Now we need to associate a program...
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
9527 -13 2007-04-04 22:06
Floor 4 Posted 2006-11-09 09:19 ·  中国 广东 佛山 广东睿江科技有限公司
荣誉版主
★★★★
batch fan
Credits 5,226
Posts 1,737
Joined 2006-03-10 00:38
20-year member
UID 51697
From 成都
Status Offline
Try the format of "program path" "file name".
尺有所短,寸有所长,学好CMD没商量。
考虑问题复杂化,解决问题简洁化。
Floor 5 Posted 2006-11-09 09:19 ·  中国 甘肃 甘南藏族自治州 合作市 电信
金牌会员
★★★★
Credits 4,103
Posts 1,744
Joined 2006-01-20 13:00
20-year member
UID 49241
Gender Male
From 甘肃.临泽
Status Offline
Originally posted by huzixuan at 2006-11-9 09:12 originally posted by huzixuan:
Is it setting file associations?
Now it's about associating a program...

Assoc /?
Ftype /?
First, take a look at these two help files!
Floor 6 Posted 2006-11-09 09:21 ·  中国 安徽 芜湖 电信
高级用户
★★
Credits 537
Posts 219
Joined 2006-10-31 21:08
19-year member
UID 69036
Gender Male
From 芜湖
Status Offline
It seems okay, thanks moderator. Test in depth tomorrow, thanks
Floor 7 Posted 2006-11-09 09:26 ·  中国 安徽 芜湖 电信
高级用户
★★
Credits 537
Posts 219
Joined 2006-10-31 21:08
19-year member
UID 69036
Gender Male
From 芜湖
Status Offline
Well, also thank vkill for the help. Take a good look at those two commands as well
Floor 8 Posted 2006-11-09 10:43 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
D:\players\ttplayer.exe E:\music\list.m3u

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 9 Posted 2006-11-11 04:30 ·  中国 安徽 芜湖 电信
高级用户
★★★
Credits 906
Posts 346
Joined 2006-07-10 09:58
20-year member
UID 58334
Gender Male
Status Offline
Friend upstairs. I tried what you wrote, it doesn't work.

F:\she din soft\KMPlayer\kmplayer.exe E:\音乐\helene segara - encore une fois 情缘再继.wav

[ Last edited by eech on 2006-11-11 at 04:32 AM ]
Floor 10 Posted 2006-11-11 04:37 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Friends on the road, just enclose the full path of kmplayer and the final song path with " "

"F:\she din soft\KMPlayer\kmplayer.exe" "E:\音乐\helene segara - encore une fois 情缘再继.wav"

If there are spaces in the path, quotes must be used~~~ (this is the nth time I've solved such a problem)

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Forum Jump: