Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Of the following file extensions, which can be run from the command prompt? (I guess it means, just run it flat out, not edit it, or view it, or what not, just run it).
.BAT, .DLL, .COM, .RUN [only 2]

I knew com could be run. And we all know exe. But bat? Bat files can be run? I know you can edit them and view them by using commands, but you can actually run them from the prompt, straight up?

Why not give it a go?? Create a .bat file using copy con:filename.bat stick cls and dir in it, finish off with Ctrl+z then Enter. At the command prompt enter filename and see if you get a dir listing of your current directory.
Good luck
V..

I went to DOS, knowing the name of a few .BAT files, and at the prompt (c:\) I typed in the name without the extension and hit enter to see if they'd run. Nothing happened....

I created a .BAT fill called useless.bat and using Textpad, put DIR in it and saved. I went to DOS and ran "useless" and got my directory listing. Cool. Thanks.

Nothing happened.... at first look...
The on-screen results of a batch file depends of the instructions the .bat file is made of...
For example, you can make a .bat file with the following two lines:
@Echo Off
Path C:\Windows;C:\IrqToCpu;%path%Now, if you run the .bat file, nothing will be displayed on the screen (so, nothing happened... at first look...); but if you check your path before and after the .bat file, you will notice that the path has been changed...
So, try the exercise Virginia told you, and
check see how a .bat file can be executed directly from the DOS prompt...Semper*

If you're at the C:\> prompt, and a batch file you wish to run is in D:\NETFILES\GOODIES\BATCH, then the path statement in your c:\autoexec.BAT (there's a hint) must contain D:\NETFILES\GOODIES\BATCH; in order to find it. Otherwise you'd have to either type out the complete path/filename(D:\NETFILES\GOODIES\BATCH\useless), or change to the drive/directory that contains the batch file, thereby making it your current working directory.
We're not doing your homework here are we? It's happened before in these forums. If we are, don't forget that you're only cheating yourself.

just try the command START ..
like this example ..
just include it in the root batch to activate another batch in it
---------------
start c:\yourpatch\batch.bat
---------------
it'll work .. trust me !!

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |