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-10 06:36
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Solved] What should be used to replace DOS spaces? View 2,038 Replies 9
Original Poster Posted 2007-12-09 02:14 ·  中国 香港 HKCABLE
初级用户
Credits 20
Posts 6
Joined 2007-12-07 12:59
18-year member
UID 104964
Gender Male
Status Offline
Why is it not allowed to use mkdir to create my folder in Batch? Spaces are not allowed. Then, if you must create a folder with a space, what should be added in the middle? For example, mkdir c:\my folder, changing it to mkdir c:\my%folder doesn't seem to work. What exactly should be placed?

[ Last edited by HAT on 2008-10-27 at 13:21 ]
Floor 2 Posted 2007-12-09 04:07 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline
Add double quotes in English on both sides.

mkdir "c:\my folder"
Floor 3 Posted 2007-12-10 11:22 ·  中国 江苏 南京 移动
新手上路
Credits 2
Posts 1
Joined 2007-12-10 10:11
18-year member
UID 105192
Gender Male
Status Offline
Learning
Floor 4 Posted 2007-12-15 14:43 ·  中国 广东 广州 电信
初级用户
Credits 82
Posts 37
Joined 2007-12-15 11:18
18-year member
UID 105721
Gender Male
Status Offline
Floor 5 Posted 2007-12-15 15:22 ·  中国 上海 松江区 电信
铂金会员
★★★★
DOS一根葱
Credits 5,493
Posts 2,315
Joined 2006-05-01 10:41
20-year member
UID 54766
Gender Male
From 上海
Status Offline
Originally posted by uouobb at 2007-12-16 14:43:
Any other methods??
??

Good question, let's see if Gates can make a concession
第一高手 第二高手

Floor 6 Posted 2008-10-27 13:17 ·  中国 上海 电信
新手上路
Credits 18
Posts 23
Joined 2008-10-27 09:57
17-year member
UID 129206
Gender Male
Status Offline
Why can't the command `net share ud$="C:\Documents and Settings\Administrator\桌面"` be executed?
Floor 7 Posted 2008-10-27 13:20 ·  中国 北京 鹏博士长城宽带
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline
C:\WINDOWS\system32>net share ud$="C:\Documents and Settings\Administrator\桌面"

The share ud$ was successful.

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
Floor 8 Posted 2008-10-27 13:21 ·  中国 上海 电信
新手上路
Credits 18
Posts 23
Joined 2008-10-27 09:57
17-year member
UID 129206
Gender Male
Status Offline
I can't execute in the batch file?

Wait, no, the correct translation should be: I can't execute in the batch file? No, that's not right. Let's do it again.

The correct translation is: I can't execute within the batch file? No, that's wrong. Wait, let's start over.

The user's input is "我在批处理文件中无法执行?" The correct English translation is "I can't execute within the batch file?" But that doesn't seem right. Wait, maybe I made a mistake. Let's do it properly.

"I can't execute within the batch file?" No, that's not correct. Wait, the correct translation is "I am unable to execute within the batch file?" Yes, that's better.
I am unable to execute within the batch file?
Floor 9 Posted 2008-10-27 13:27 ·  中国 北京 鹏博士长城宽带
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline
Add a PAUSE at the end of the batch, then run it and see what the prompt is, and post it here. If convenient, paste the code here.

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
Floor 10 Posted 2008-10-27 15:23 ·  中国 福建 厦门 电信
新手上路
Credits 1
Posts 1
Joined 2008-10-27 14:55
17-year member
UID 129235
Gender Male
Status Offline
Got it, thanks!
Forum Jump: