English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

how can i write a .bat on ms dos?
i dont what it to send it just to know im going to finish school so im gonna study programacion

2007-03-06 09:02:33 · 4 answers · asked by Anonymous in Computers & Internet Programming & Design

4 answers

Batch files are just DOS scripts, so any command or program you can run in DOS you can put into a batch file. batch files can be written in any text editor, you don't need anything except windows. Here is a simple batch file I wrote that calls another batch file and passes a parameter:

@ECHO OFF

:: repository server
CALL C:\daisy-1.4\repository-server\bin\daisy-repository-server.bat C:\daisydata

The top line prevents DOS from echoing, printing, any errors or responses to my DOS windows. At least, in theory that is what it does, things don't always work the way they say, especially in windows.

I don't remember what :: is, so not the best example.

The last line is what the script actually does, in this case it calls a another batch file with a parameter

The simplest batch script would probably looks like this:

In file test.bat
ECHO hi

If you want to write this in MS DOS you can type EDIT and DOS will open its text editors. It is really... awesome. BTW, DOS isn't case sensitive.

EDIT: On a side note, if you are trying to use script writing to understand some basic computer science concepts I would suggest something like bash shell scripts on LINUX. That will force some more important and fundamental computer science concepts into your view than batch files will. With UNIX based operating systems you run into things like the kernal and the file system, while in Windows, they hide all that from you. So you won't learn too much from batch scripts.

2007-03-06 09:19:21 · answer #1 · answered by Anonymous · 1 0

For begginers, once you have finished typing out a batch file in NotePad.exe. Pressing Ctrl + H will allow you to replace certain words with more specific words.
(i.e. " :TOP " could be replaced with " :Beginning ") or whatever you want to better identify that part of the batch file.
Start small, then expand the batch as you understand.

!WARNING!
DON'T CHANGE the COMMANDS LIKE:
"START", "GOTO" or "IF EXISTS" . because BATCH FILE WON'T RUN CORRECTLY.!

2016-10-12 12:33:05 · answer #2 · answered by ? 1 · 0 0

Hi,

If you want to do it through command prompt (DOS emulator in Windows) then click Start->Run and type cmd.

In the window type: edit whatever.bat

This will open the "DOS" editor. If you actually have DOS the same command works.

HTH

PS You've just made me feel so old now ;)

2007-03-06 09:11:49 · answer #3 · answered by Conspiracy 3 · 0 0

Hola 7!

Ekse you bro... you use the normal notepad on the computer and save it with the extension (.bat) and the Save type as: should be "All"

Bat files use the normal commands the command prompt uses... good luck junior Geek, welcome to the club

uit to the suid koast. echtes :)

2007-03-06 09:08:46 · answer #4 · answered by Mac-C 4 · 2 0

fedest.com, questions and answers