中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-14 17:21
47,813 topics / 349,901 posts / today 3 new / 48,257 members
DOS疑难解答 & 问题讨论 (解答室) » Old illness, new medicine: Entering Chinese directories in non-Chinese environments
Printable Version  4,781 / 35
Floor16 luxuriant1770 Posted 2005-09-16 20:20
新手上路 Posts 3 Credits 4 From 能容納我的地方
It's a tough problem, I've been unable to find the answer all the time.............
Floor17 brglng Posted 2005-09-16 23:31
银牌会员 Posts 466 Credits 1,200 From 上海
If you can use an external tool, it can be solved with a mousclip.
Floor18 xjmxjm1234 Posted 2006-04-18 21:58
中级用户 Posts 166 Credits 361
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 ]
Floor19 xjmxjm1234 Posted 2006-04-18 22:19
中级用户 Posts 166 Credits 361
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!
Floor20 xjmxjm1234 Posted 2006-04-18 22:27
中级用户 Posts 166 Credits 361
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.
Floor21 willsort Posted 2006-04-18 23:11
元老会员 Posts 1,512 Credits 4,432
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 ]
Floor22 zhangxue Posted 2006-04-19 09:47
初级用户 Posts 82 Credits 183
I'm a bit confused why it works in the root directory but fails in the second - level directory.
Floor23 willsort Posted 2006-04-19 14:07
元老会员 Posts 1,512 Credits 4,432
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.
Floor24 zhangxue Posted 2006-04-19 14:41
初级用户 Posts 82 Credits 183
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 (28.91 KiB)
Snap2.jpg (16.62 KiB)
Snap3.jpg (28.5 KiB)
Floor25 zhangxue Posted 2006-04-19 14:48
初级用户 Posts 82 Credits 183
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.
Floor26 willsort Posted 2006-04-19 15:00
元老会员 Posts 1,512 Credits 4,432
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 ]
Floor27 xjmxjm1234 Posted 2006-04-19 17:45
中级用户 Posts 166 Credits 361
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.
Floor28 zereyzerey Posted 2006-04-25 20:16
初级用户 Posts 20 Credits 43 From gd
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.
Floor29 kcdsw Posted 2006-04-27 19:50
中级用户 Posts 179 Credits 404
What is the active code page?
Floor30 xjmxjm1234 Posted 2006-04-28 22:02
中级用户 Posts 166 Credits 361
But it's very difficult to do it with only internal commands.
Prev  1 2 3  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023