Reference number: CH000598
How do I run a file from MS-DOS?
Issue:How do I run a file from MS-DOS?
Solution:To execute or run a file from MS-DOS you must run an executable
file, which are .exe, .bat, or .com files.
If you are uncertain with what files in the current directory using
the dir command can list all files in
the current directory. If you only wish to view executable files you can type the below command at the MS-DOS
prompt
to list .exe files, or replace .exe with .bat or .com to see those
files in the current directory.
dir *.exe
Once you have determined the name of the executable file you wish
to run, type the name of the executable file at the MS-DOS prompt.
For example, if the file were game.exe you would type "game"
at the MS-DOS prompt. If you do not see the file you wish to
execute or are receiving an error such as "bad command or file name"
it is likely that the file you're attempting to execute is not in
the directory you're currently in. Move to the directory of the
executable file and attempt to execute the command again. For
example, lets assume you downloaded the executable file game.exe and
it is on the Windows XP desktop. Using the cd
command you can switch to the desktop directory by typing a
command similar to the below example.
cd\docume~1\hope\desktop or in some cases if you're
already in the username directory of documents and settings you can
simply type the below command. cd desktop
Finally, it is important to realize that when running an executable file
from a MS-DOS shell (running MS-DOS
within windows) that the program will still use Windows to run. If
you wish to run any other file types you can use the MS-DOS start
command and type: "start name_of_file" where
name_of_file is the files name.
Additional information:
- See our cd command and
dir command pages for additional
information about each of these commands.
- Additional information about installing a software program can
be found on document CH000561.
|