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-11-20 12:28
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » Old illness, new medicine: Entering Chinese directories in non-Chinese environments View 5,868 Replies 35
Floor 16 Posted 2005-09-16 20:20 ·  中国 广西 南宁 电信
新手上路
★
Credits 4
Posts 3
Joined 2005-09-16 10:25
21-year member
UID 42548
From 能容納我的地方
Status Offline
It's a tough problem, I've been unable to find the answer all the time.............
朙忝亓雙髹钌!
Floor 17 Posted 2005-09-16 23:31 ·  中国 上海 徐汇区 电信
银牌会员
★★★
永遠的DOS~~~
Credits 1,200
Posts 466
Joined 2005-02-01 00:00
21-year member
UID 35867
Gender Male
From 上海
Status Offline
If you can use an external tool, it can be solved with a mousclip.
32位才是DOS未来的希望
个人网志:http://sololand.moe
Floor 18 Posted 2006-04-18 21:58 ·  中国 上海 闵行区 电信
中级用户
★★
论坛第一菜鸟
Credits 361
Posts 166
Joined 2006-04-15 13:23
20-year member
UID 53870
Status Offline
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
Floor 19 Posted 2006-04-18 22:19 ·  中国 上海 徐汇区 电信
中级用户
★★
论坛第一菜鸟
Credits 361
Posts 166
Joined 2006-04-15 13:23
20-year member
UID 53870
Status Offline
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
Floor 20 Posted 2006-04-18 22:27 ·  中国 上海 徐汇区 电信
中级用户
★★
论坛第一菜鸟
Credits 361
Posts 166
Joined 2006-04-15 13:23
20-year member
UID 53870
Status Offline
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
Floor 21 Posted 2006-04-18 23:11 ·  中国 山西 运城 中移铁通
元老会员
★★★★
Batchinger
Credits 4,432
Posts 1,512
Joined 2002-10-18 00:00
24-year member
UID 19
Gender Male
Status Offline
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:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得!
Floor 22 Posted 2006-04-19 09:47 ·  中国 广东 清远 联通
初级用户
★★
Credits 183
Posts 82
Joined 2006-03-28 21:18
20-year member
UID 52959
Status Offline
I'm a bit confused why it works in the root directory but fails in the second - level directory.
Floor 23 Posted 2006-04-19 14:07 ·  中国 山西 大同 中移铁通
元老会员
★★★★
Batchinger
Credits 4,432
Posts 1,512
Joined 2002-10-18 00:00
24-year member
UID 19
Gender Male
Status Offline
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:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得!
Floor 24 Posted 2006-04-19 14:41 ·  中国 广东 清远 联通
初级用户
★★
Credits 183
Posts 82
Joined 2006-03-28 21:18
20-year member
UID 52959
Status Offline
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 ]
Attachments
Snap1.jpg
Snap2.jpg
Snap3.jpg
Floor 25 Posted 2006-04-19 14:48 ·  中国 广东 清远 联通
初级用户
★★
Credits 183
Posts 82
Joined 2006-03-28 21:18
20-year member
UID 52959
Status Offline
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.
Floor 26 Posted 2006-04-19 15:00 ·  中国 山西 大同 中移铁通
元老会员
★★★★
Batchinger
Credits 4,432
Posts 1,512
Joined 2002-10-18 00:00
24-year member
UID 19
Gender Male
Status Offline
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:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得!
Floor 27 Posted 2006-04-19 17:45 ·  中国 上海 浦东新区 电信
中级用户
★★
论坛第一菜鸟
Credits 361
Posts 166
Joined 2006-04-15 13:23
20-year member
UID 53870
Status Offline
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
Floor 28 Posted 2006-04-25 20:16 ·  中国 广东 广州 增城区 电信
初级用户
★
Credits 43
Posts 20
Joined 2006-04-24 11:10
20-year member
UID 54364
Gender Male
From gd
Status Offline
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 [open] menu. Although it's garbled, you can still enter. After seeing the file you want (such as ghost.exe), press the [Esc] key to exit, then exit edit.com. At the prompt, type c:[Enter], 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.
Floor 29 Posted 2006-04-27 19:50 ·  中国 北京 鹏博士BGP
中级用户
★★
Credits 404
Posts 179
Joined 2006-03-30 14:44
20-year member
UID 53056
Status Offline
What is the active code page?
Floor 30 Posted 2006-04-28 22:02 ·  中国 上海 浦东新区 电信
中级用户
★★
论坛第一菜鸟
Credits 361
Posts 166
Joined 2006-04-15 13:23
20-year member
UID 53870
Status Offline
But it's very difficult to do it with only internal commands.
Diskette Operating System
Forum Jump: