|
luxuriant1770
新手上路

积分 4
发帖 3
注册 2005-9-16 来自 能容納我的地方
状态 离线
|
『第 16 楼』:
使用 LLM 解释/回答一下
難題啊,我一直沒找到答案.............
It's a tough problem, I've been unable to find the answer all the time.............
|

朙忝亓雙髹钌! |
|
2005-9-16 20:20 |
|
|
brglng
银牌会员
     永遠的DOS~~~
积分 1200
发帖 466
注册 2005-2-1 来自 上海
状态 离线
|
|
2005-9-16 23:31 |
|
|
xjmxjm1234
中级用户
   论坛第一菜鸟
积分 361
发帖 166
注册 2006-4-15
状态 离线
|
『第 18 楼』:
使用 LLM 解释/回答一下
原来是围绕着 dir 命令来的啊
问题6:
d:
cd \
copy con enter.bat
cd (键入Ctrl+Z或者键入“F6”键,不含括号)
dir ????2 /ad /b>>enter.bat
enter
Last edited by xjmxjm1234 on 2006-4-19 at 08:10 ]
So it turns out it's about the dir command.
Question 6:
d:
cd \
copy con enter.bat
cd (Type Ctrl+Z or type "F6" key, without parentheses)
dir ????2 /ad /b>>enter.bat
enter
Last edited by xjmxjm1234 on 2006-4-19 at 08:10 ]
|

Diskette Operating System |
|
2006-4-18 21:58 |
|
|
xjmxjm1234
中级用户
   论坛第一菜鸟
积分 361
发帖 166
注册 2006-4-15
状态 离线
|
『第 19 楼』:
使用 LLM 解释/回答一下
至于问题4和5:
用了 dir/s/b test.dat 但总是带test.dat
用了 truename 但总是在根目录
好难,公布答案吧!
As for questions 4 and 5:
Used dir/s/b test.dat but always with test.dat
Used truename but always in the root directory
So hard, publish the answer!
|

Diskette Operating System |
|
2006-4-18 22:19 |
|
|
xjmxjm1234
中级用户
   论坛第一菜鸟
积分 361
发帖 166
注册 2006-4-15
状态 离线
|
『第 20 楼』:
使用 LLM 解释/回答一下
资料:所有内部命令
Internal (内部命令): ( 注:这些是msdos7.X中支持的内部命令)
Break 设置对键盘中断某程序执行的命令的检查。即对ctrl -C 的检查。
Call 呼叫另一个批处理,或可执行文件,或command
CD / ChDir 进入目录(退出目录)
CHCP 修改或显示当前的代码页
Cls 清屏
Copy 复制,拷贝
CTTY 将控制台输入和输出改向其它设备
Date 显示或设置系统日期
Del / Erase 删除文件
Dir 列出文件和目录列表
Echo 显示控制开关。
Exit 退出command环境。(该command环境是在DOS提示符中执行另一个新的command的拷贝而创建的,也叫dos SHELL?)
For 用于运行一指定命令或一系列的命令. 通常用在批处理文件中,但也能用于命令提示符后。
GoTo 转向语句
If 条件语句
LfnFor 当运行FOR命令时支持长文件名。
Lock 锁定对磁盘的直接读取。
MD / MkDir 创建目录
Path 路径
Pause 暂停
Prompt 设置提示符格式
RD / RmDir 删除目录
Rem & :: 注释
Ren / Rename 改名,重命名
Set 设置
Shift 位移,在批处理文件中用作改变可替换参数的位置。
Time 显示和设置时间
Truename 显示长文件名格式和8.3格式之间的对应关系,或subst命令创建的虚拟盘
Type 在屏幕上显示文本文件的内容
Unlock 解锁对磁盘的直接读取
Ver 显示msdos的版本号
Verify 校验。以保证写入磁盘的内容可读。
Vol 显示磁盘的卷标和序列号。
Materials: All internal commands
Internal commands: (Note: These are the internal commands supported in msdos7.X)
Break: Set the check for the command to interrupt the execution of a program via the keyboard. That is, the check for ctrl-C.
Call: Call another batch processing, or executable file, or command
CD / ChDir: Enter directory (exit directory)
CHCP: Modify or display the current code page
Cls: Clear screen
Copy: Copy, duplicate
CTTY: Redirect console input and output to other devices
Date: Display or set the system date
Del / Erase: Delete file
Dir: List files and directory lists
Echo: Display control switch.
Exit: Exit the command environment. (This command environment is created by executing another copy of the new command in the DOS prompt, also called the dos SHELL?)
For: Used to run a specified command or a series of commands. Usually used in batch files, but can also be used after the command prompt.
GoTo: Jump statement
If: Conditional statement
LfnFor: Supports long file names when running the FOR command.
Lock: Lock direct reading of the disk.
MD / MkDir: Create directory
Path: Path
Pause: Pause
Prompt: Set prompt format
RD / RmDir: Delete directory
Rem & ::: Comment
Ren / Rename: Rename, rename
Set: Set
Shift: Shift, used in batch files to change the position of replaceable parameters.
Time: Display and set time
Truename: Display the corresponding relationship between the long file name format and the 8.3 format, or the virtual disk created by the subst command
Type: Display the content of the text file on the screen
Unlock: Unlock direct reading of the disk
Ver: Display the version number of msdos
Verify: Verify. To ensure that the content written to the disk is readable.
Vol: Display the volume label and serial number of the disk.
|

Diskette Operating System |
|
2006-4-18 22:27 |
|
|
willsort
元老会员
         Batchinger
积分 4432
发帖 1512
注册 2002-10-18
状态 离线
|
『第 21 楼』:
使用 LLM 解释/回答一下
Re xjmxjm1234:
兄对第6题存在误解,题中目录名数字均为全角,在非中文环境下无法输入。
现公布第4题我的解答,主要利用了命令行的交互特性,需要用户控制。如果在批处理中,且不使用外部命令,则需要使用复杂的技巧来实现判断选择,还没有考虑得很完善。
d:
cd \
dir /ad /on /p /s /w
(用户交互:观察命令输出中test.dat位于哪个目录中)
copy con enter.bat
cd (键入Ctrl+Z或者键入“F6”键,不含括号)
(如果test.dat在第一个目录,则 dir /ad /b /on>>enter.bat)
(如果test.dat在第二个目录,则 dir /ad /b /o-n>>enter.bat)
enter
Last edited by willsort on 2006-4-19 at 17:56 ]
Re xjmxjm1234:
Brother, you have a misunderstanding about question 6. The numbers in the directory names in the question are all full-width, and cannot be entered in a non-Chinese environment.
Now I will publish my solution to question 4. It mainly uses the interactive characteristics of the command line and requires user control. If it is in a batch processing and does not use external commands, complex techniques are needed to achieve judgment and selection, and it has not been considered very perfectly yet.
d:
cd \
dir /ad /on /p /s /w
(User interaction: Observe which directory the test.dat is located in among the command output)
copy con enter.bat
cd (Type Ctrl+Z or press the "F6" key, without parentheses)
(If test.dat is in the first directory, then dir /ad /b /on>>enter.bat)
(If test.dat is in the second directory, then dir /ad /b /o-n>>enter.bat)
enter
Last edited by willsort on 2006-4-19 at 17:56 ]
|

※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得! |
|
2006-4-18 23:11 |
|
|
zhangxue
初级用户
 
积分 183
发帖 82
注册 2006-3-28
状态 离线
|
『第 22 楼』:
使用 LLM 解释/回答一下
有点不明白为何在根目录就可以,在第二层目录就失败。
I'm a bit confused why it works in the root directory but fails in the second - level directory.
|
|
2006-4-19 09:47 |
|
|
willsort
元老会员
         Batchinger
积分 4432
发帖 1512
注册 2002-10-18
状态 离线
|
『第 23 楼』:
使用 LLM 解释/回答一下
Re zhangxue:
请注意解答中的第二行"cd \",它是将当前目录切换为题目中的测试目录——根目录,如果你的测试目录在子目录下,则需要用 cd subdir 之类的语句进行切换。
Re zhangxue:
Please note that in the second line of the solution "cd \" which switches the current directory to the test directory mentioned in the question - the root directory. If your test directory is in a sub - directory, you need to use a statement like cd subdir to switch.
|

※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得! |
|
2006-4-19 14:07 |
|
|
zhangxue
初级用户
 
积分 183
发帖 82
注册 2006-3-28
状态 离线
|
『第 24 楼』:
使用 LLM 解释/回答一下
我并没有cd\,图1,2是在根目录测试,有两个目录:(1)System Volume Information;(2)新建文件夹。测试成功。
图三是在test目录进行测试,里面只有一个目录:新建文件夹。测试失败。
Last edited by zhangxue on 2006-4-19 at 14:45 ]
I didn't do cd\. Figure 1 and 2 are tested in the root directory, there are two directories: (1) System Volume Information; (2) New Folder. The test is successful.
Figure 3 is tested in the test directory, there is only one directory: New Folder. The test fails.
Last edited by zhangxue on 2006-4-19 at 14:45 ]
附件
1: Snap1.jpg (2006-4-19 14:41, 28.91 KiB, 下载附件所需积分 1 点
,下载次数: 1)
附件
2: Snap2.jpg (2006-4-19 14:41, 16.62 KiB, 下载附件所需积分 1 点
,下载次数: 1)
附件
3: Snap3.jpg (2006-4-19 14:52, 28.5 KiB, 下载附件所需积分 1 点
,下载次数: 1)
|
|
2006-4-19 14:41 |
|
|
zhangxue
初级用户
 
积分 183
发帖 82
注册 2006-3-28
状态 离线
|
『第 25 楼』:
使用 LLM 解释/回答一下
简单的说就是在根目录下,可以用cd ?????进入名为“新建文件夹”的目录。
但是却不能在test目录中用cd ?????来进入名为"新建文件夹"的目录。
Simply put, you can use `cd ?????` to enter the directory named "New Folder" in the root directory. However, you cannot use `cd ?????` to enter the directory named "New Folder" in the test directory.
|
|
2006-4-19 14:48 |
|
|
willsort
元老会员
         Batchinger
积分 4432
发帖 1512
注册 2002-10-18
状态 离线
|
『第 26 楼』:
使用 LLM 解释/回答一下
Re zhangxue:
已经证实,以上的我的一系列解答,在NT CMD环境下无效,感谢 zhangxue 兄的提醒。
其原因是因为,NTCMD将无法识别其编码的字符串均转换成为了由问号组成的字符串,这导致字符串的内码发生变化,当然就无从进入相应的目录了。
在根目录下的测试成功,是因为NTCMD在根目录下使用类似cd ?????的命令形式时,会将?????作为通配符进行匹配,由此导致cd ?????会进入第一个匹配的目录中,即第一个含有5个或5个以内字符的子目录。而在其他各级子目录下NTCMD无此特性。
另外,建议zhangxue兄在转贴命令行输出内容时,仅复制和粘贴输出的文字信息,以节省论坛有限的附件空间资源。复制方法,在命令行窗口中,点击右键,选择“标记”,然后拖动鼠标选择复制区域,选定后按回车即复制完成,然后再粘贴到论坛帖中即可。
Last edited by willsort on 2006-4-19 at 15:05 ]
Re zhangxue:
It has been confirmed that the above series of my answers are invalid under the NT CMD environment. Thanks to Brother zhangxue for the reminder.
The reason is that NTCMD converts all unrecognized encoded strings into strings composed of question marks, which causes the internal code of the string to change, and of course it is impossible to enter the corresponding directory.
The test in the root directory was successful because when NTCMD uses a command form like cd ????? in the root directory, it will match ????? as a wildcard, which leads to cd ????? entering the first matching directory, that is, the first subdirectory with 5 or fewer characters. NTCMD does not have this feature in other subdirectories at all levels.
In addition, it is suggested that Brother zhangxue only copy and paste the output text information when reposting the command line output content, so as to save the limited attachment space resources of the forum. The copying method is to click the right mouse button in the command line window, select "Mark", then drag the mouse to select the copy area, and press Enter after selection to complete the copy, and then paste it into the forum post.
Last edited by willsort on 2006-4-19 at 15:05 ]
|

※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得! |
|
2006-4-19 15:00 |
|
|
xjmxjm1234
中级用户
   论坛第一菜鸟
积分 361
发帖 166
注册 2006-4-15
状态 离线
|
『第 27 楼』:
使用 LLM 解释/回答一下
真的很难啊,是不是要用 shift 命令啊,我不大会哦
在 cmd.exe 里 ? 表示一个字符(一个汉字)
而在 dos 里 ? 表示一个字节哦(半个汉字) 不一样的
It's really difficult. Do I need to use the shift command? I'm not very good at it. In cmd.exe,? represents one character (one Chinese character), while in DOS,? represents one byte (half a Chinese character). They are different.
|

Diskette Operating System |
|
2006-4-19 17:45 |
|
|
zereyzerey
初级用户
 
积分 43
发帖 20
注册 2006-4-24 来自 gd
状态 离线
|
『第 28 楼』:
只要有edit.com就可以
使用 LLM 解释/回答一下
我以前常遇到这样的问题,如果你要进C盘某一中文目录。你就先要进其他盘。只要不是C盘就可以了。然后运行edit然后在[open]菜单下打开你要进的中文目录。虽然是乱码,但是不是可以进。见到你想要的文件后(例如ghost.exe)。再按[Esc]键退出,再退出edit.com,在提示符下再打 c:[回车],你就会发现进了刚才用edit.com浏览的中文目录了。虽然有点复杂,但是可行性是100%。你们可以试试。
I used to often encounter such a problem. If you want to enter a Chinese directory on drive C, you first need to enter another drive. As long as it's not drive C. Then run edit and open the Chinese directory you want to enter under the menu. Although it's garbled, you can still enter. After seeing the file you want (such as ghost.exe), press the key to exit, then exit edit.com. At the prompt, type c:, and you will find that you have entered the Chinese directory you browsed with edit.com. Although it's a bit complicated, the feasibility is 100%. You can give it a try.
|
|
2006-4-25 20:16 |
|
|
kcdsw
中级用户
  
积分 404
发帖 179
注册 2006-3-30
状态 离线
|
『第 29 楼』:
使用 LLM 解释/回答一下
chcp ??
活动的代码页?
What is the active code page?
|
|
2006-4-27 19:50 |
|
|
xjmxjm1234
中级用户
   论坛第一菜鸟
积分 361
发帖 166
注册 2006-4-15
状态 离线
|
『第 30 楼』:
使用 LLM 解释/回答一下
可是只用内部命令就很难了.
But it's very difficult to do it with only internal commands.
|

Diskette Operating System |
|
2006-4-28 22:02 |
|