中国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-15 11:03
47,813 topics / 349,903 posts / today 1 new / 48,257 members
DOS疑难解答 & 问题讨论 (解答室) » Why can't the EDIT command be used??
Printable Version  3,833 / 18
Floor1 想学DOS Posted 2002-11-26 00:00
中级用户 Posts 50 Credits 234
The EDIT.EXE file is properly placed in the DOS directory, so why still can't it be used???
Floor2 Wengier Posted 2002-11-26 00:00
系统支持 Posts 10,521 Credits 27,736
What error appears when you run it?
Floor3 想学DOS Posted 2002-11-26 00:00
中级用户 Posts 50 Credits 234
It just says it's a bad command.



Floor4 想学DOS Posted 2002-11-26 00:00
中级用户 Posts 50 Credits 234
I know you have a way to solve it )

Floor5 Wengier Posted 2002-11-26 00:00
系统支持 Posts 10,521 Credits 27,736
That's probably because the PATH wasn't set to the DOS path.
Floor6 想学DOS Posted 2002-11-26 00:00
中级用户 Posts 50 Credits 234
Heh, I still don't understand what PATH is for. Could you explain it in detail? Thank you.
Floor7 MYS Posted 2002-11-26 00:00
元老会员 Posts 1,637 Credits 5,170 From 广东佛山
Add this line in autoexec.bat:
path=%PATH%;c:\dos
%PATH% refers to the original path, so the newly added path won't overwrite the original one.
Floor8 Wengier Posted 2002-11-26 00:00
系统支持 Posts 10,521 Credits 27,736
Or try typing C:\DOS\EDIT at the command line.
Floor9 想学DOS Posted 2002-11-26 00:00
中级用户 Posts 50 Credits 234
Thanks to both of you, the problem is solved.
What other uses does PATH have?
Floor10 Wengier Posted 2002-11-26 00:00
系统支持 Posts 10,521 Credits 27,736
PATH is generally used like this. For example, PATH C:\DOS;D:\DOS sets C:\DOS and D:\DOS as the two search paths.
Floor11 想学DOS Posted 2002-11-26 00:00
中级用户 Posts 50 Credits 234
So after this statement is added, whenever a command is executed, the system will search the set paths to see whether they contain that command file; if not it skips it, and if yes it executes it??


Floor12 Wengier Posted 2002-11-26 00:00
系统支持 Posts 10,521 Credits 27,736
Exactly.
Floor13 想学DOS Posted 2002-11-26 00:00
中级用户 Posts 50 Credits 234
I've seen other people type PATH directly at the command line without modifying AUTOEXEC.BAT. What's the idea behind that?
Floor14 Wengier Posted 2002-11-26 00:00
系统支持 Posts 10,521 Credits 27,736
AUTOEXEC.BAT is a batch file, that is, a collection of command-line commands, so of course you can also enter PATH directly at the command line. But note that MS-DOS 6.22 does not support entering %PATH% directly at the command line, while MS-DOS 7.10 does support it (after all, it's a newer version!).
Floor15 想学DOS Posted 2002-11-26 00:00
中级用户 Posts 50 Credits 234
If you enter it at the command line, then after the system restarts wouldn't the previous action become ineffective?
And as that gentleman just said, if you don't add %PATH% it will overwrite what was there before, so if you just use PATH directly
wouldn't that overwrite some commands?
1 2  Next
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023