Say you have saved a batch file in the c:\name
directory. Now when
you launch command.com the default directory is c:\windows and in
order to
execute the batch file program stored in the c:\name directory you
need to
change the directory and go to c:\name.This can be very irritating and
time
consuming. It is a good practice to store all your batch programs in the
same folder. You can run a batch file stored in any folder(Say c:\name) from
anywhere(even c:\windows\history) if you include the folder in which the
batch
file is stored (c:\name)in the AUTOEXEC.BAT file, so that DOS knows
which folder
to look for the batch program.
So simply open c:\autoexec.bat in Notepad and append the Path
statement to the
following line[c:\name is the folder in which all your batch files are
stored.]:
SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\name
Autoexec.bat runs each time at startup and DOS knows each time, in
which
directory to look for the batch files.
directory. Now when
you launch command.com the default directory is c:\windows and in
order to
execute the batch file program stored in the c:\name directory you
need to
change the directory and go to c:\name.This can be very irritating and
time
consuming. It is a good practice to store all your batch programs in the
same folder. You can run a batch file stored in any folder(Say c:\name) from
anywhere(even c:\windows\history) if you include the folder in which the
batch
file is stored (c:\name)in the AUTOEXEC.BAT file, so that DOS knows
which folder
to look for the batch program.
So simply open c:\autoexec.bat in Notepad and append the Path
statement to the
following line[c:\name is the folder in which all your batch files are
stored.]:
SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\name
Autoexec.bat runs each time at startup and DOS knows each time, in
which
directory to look for the batch files.
No comments:
Post a Comment