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-07-31 22:27
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to open this type of folder with batch processing View 2,846 Replies 27
Floor 16 Posted 2008-08-29 21:56 ·  中国 广东 广州 电信
银牌会员
★★★
永远的菜鸟
Credits 1,335
Posts 574
Joined 2007-11-27 12:50
18-year member
UID 103929
Gender Male
From 广西
Status Offline
[ Last edited by moniuming on 2008-8-30 at 12:39 AM ]
Floor 17 Posted 2008-08-29 23:47 ·  中国 北京 海淀区 联通
银牌会员
★★★
Credits 2,098
Posts 566
Joined 2007-09-11 07:27
18-year member
UID 97070
Gender Male
Status Offline
```
::It seems we can only use SendKeys. Assume there is a C:\con folder
@echo off
explorer c:\
>t.vbs echo createobject("wscript.shell").sendkeys("{f6}c:\con~")
cscript //nologo t.vbs
del t.vbs
```
Floor 18 Posted 2008-08-30 00:18 ·  中国 北京 海淀区 联通
银牌会员
★★★
Credits 2,098
Posts 566
Joined 2007-09-11 07:27
18-year member
UID 97070
Gender Male
Status Offline
Originally posted by s11ss at 2008-8-29 11:47 PM:
::It seems that only SendKeys can be used. Suppose there is a C:\con folder
@echo off
explorer c:\
>t.vbs echo createobject("wscript.shell").sendkeys("{f6}c:\con~")
cscript //nolo ...


It turns out that SendKeys is not necessary!
Directly use start. If there is a C:\con folder, use this command to open:
start c:\con\

That is to say:
1. The complete absolute path must be written;
2. This complete absolute path must end with a "\".


If there are spaces in the path, use the following form:
start "new" "c:\test dir\con\"

[ Last edited by s11ss on 2008-8-30 at 12:26 AM ]
Recent Ratings for This Post ( 4 in total) Click for details
RaterScoreTime
HAT +10 2008-08-30 00:30
moniuming +8 2008-08-30 00:31
radem +4 2008-08-30 02:24
huahua0919 +11 2008-09-07 12:46
Floor 19 Posted 2008-08-30 00:29 ·  中国 广东 韶关 电信
高级用户
★★★
CMD感染者
Credits 691
Posts 383
Joined 2008-05-23 00:38
18-year member
UID 119451
Gender Male
Status Offline
So it turned out to be the problem of missing "\".
Floor 20 Posted 2008-08-30 00:30 ·  中国 重庆 九龙坡区 电信
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
Learning
Floor 21 Posted 2008-08-30 00:33 ·  中国 广东 广州 电信
银牌会员
★★★
永远的菜鸟
Credits 1,335
Posts 574
Joined 2007-11-27 12:50
18-year member
UID 103929
Gender Male
From 广西
Status Offline
Can we also create a folder named "nul"?
Floor 22 Posted 2008-08-30 00:36 ·  中国 重庆 九龙坡区 电信
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
You can use the previously mentioned renameplus.exe
Floor 23 Posted 2008-08-30 00:37 ·  中国 广东 广州 电信
银牌会员
★★★
永远的菜鸟
Credits 1,335
Posts 574
Joined 2007-11-27 12:50
18-year member
UID 103929
Gender Male
From 广西
Status Offline
It's really possible. To create such a folder, you must follow the method in floor 18, enter the absolute path and add \ at the end.
Floor 24 Posted 2008-08-30 00:42 ·  中国 重庆 九龙坡区 电信
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
Well, yes, md is also okay, but how to create a file with this name?
Floor 25 Posted 2008-08-30 01:48 ·  中国 北京 海淀区 联通
银牌会员
★★★
Credits 2,098
Posts 566
Joined 2007-09-11 07:27
18-year member
UID 97070
Gender Male
Status Offline
Originally posted by moniuming at 2008-8-30 12:37 AM:
It really can. To create such a folder, you must follow the method in post 18, enter the absolute path and add \ at the end


Creating such a folder doesn't necessarily require entering an absolute path, but you must add \ at the end
Floor 26 Posted 2008-09-07 04:51 ·  中国 北京 联通
银牌会员
★★★
Credits 2,098
Posts 566
Joined 2007-09-11 07:27
18-year member
UID 97070
Gender Male
Status Offline
Originally posted by HAT at 2008-8-30 12:42 AM:
Well, yes, md can also be used, but how to create a file with this name?

1. The absolute path must be written
2. The absolute path must be prefixed with \\?\

For example:
::Create a con file in the current path:
cd.>\\?\%cd%\con

Other operations such as moving and deleting also need to follow the above two points.
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
HAT +6 2008-09-07 11:34
Floor 27 Posted 2008-09-07 11:34 ·  中国 重庆 九龙坡区 电信
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
Learning
Floor 28 Posted 2008-09-07 11:37 ·  中国 北京 海淀区 联通
银牌会员
★★★
Credits 2,098
Posts 566
Joined 2007-09-11 07:27
18-year member
UID 97070
Gender Male
Status Offline
Add one more point: if the path contains spaces, it needs to be enclosed in quotes:

::Create a con file in the current path containing spaces:

cd.>\\?\"%cd%"\con
Forum Jump: