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!
Credits 218 Posts 26 Joined 2003-05-10 00:00 23-year member UID 1973 Gender Male
Status Offline
But my classmate just wrote a simple autoexec himself, then put a path in it and it worked.
Since the admin's path can specify a: and c:, why can't it specify more paths?
Credits 218 Posts 26 Joined 2003-05-10 00:00 23-year member UID 1973 Gender Male
Status Offline
Yeah, the problem is solved now.
I changed the path after
SET TMP=%RAMDRIVE%\TEMP
SET TEMP=%RAMDRIVE%\TEMP
PATH=%RAMDRIVE%.;%RAMDRIVE%\SYSTEM
and now no matter where I am I can run the stuff in those two folders.
Credits 317 Posts 52 Joined 2003-05-18 12:00 23-year member UID 2231 Gender Male
Status Offline
In batch processing, that % thing has always been something I don't understand. I'd appreciate everyone's guidance.
What are %1 through %9? I've never seen them marked in a .BAT file.
Credits 9,654 Posts 3,351 Joined 2003-03-11 00:00 23-year member UID 1113 Gender Male From 湖北
Status Offline
The following is quoted from 我爱dos on 2003-5-31 14:35:00:
In batch processing, that % thing has always been something I don't understand. I'd appreciate everyone's guidance.
What are %1 through %9? I've never seen them marked in a .BAT file.
This is a variable set by DOS, which makes batch execution of bat files easier.
Credits 27,736 Posts 10,521 Joined 2002-10-09 12:00 23-year member UID 9
Status Offline
The following is quoted from nihlathak on 2003-5-30 19:50:47:
Yeah, the problem is solved now.
I changed the path after
SET TMP=%RAMDRIVE%\TEMP
SET TEMP=%RAMDRIVE%\TEMP
PATH=%RAMDRIVE%.;%RAMDRIVE%\SYSTEM
and now no matter where I am I can run the stuff in those two folders.
But why exactly?
I still don't understand!!
That's because DOS automatically searches for programs in all the paths specified in PATH.