ANY MS DOS EXPERTS?

G

gabe c

I have a question...
1.What is a batch file?
2. How can I make a batch file tht will clear the screen and print the
contents of a specific file on the screen?
Thanks ahead of time and does anyone know of any msdos newsgroups?
By typing
cls filename.txt
will this create a batch or do I have to type something ahead of it first?
 
C

Colin

1. It executable dos file which holds dos commands. It is
really just a .txt file with a .bat extension

2. cls will clear the screen. the command
type filename.txt will output the contents to the screen.

Cheers.

Colin
 
O

Opinicus

2. How can I make a batch file tht will clear the screen
and print the
contents of a specific file on the screen?

Try this.

Open a DOS prompt in the same folder as the file you want to print the
contents of.

Enter the next three lines individually followed by a carriage return (enter
key). (Important: Instead of {filename.txt} put the name of the file that
you want to print to the screen.)

copy con: print.bat
cls
type {filename.txt}

Now enter control-z. (While holding down the control-key, press the "z"
key.)

You have now created a batch file that will clear the screen and type the
contents of the file you've chosen to the screen.

Now for the benefit of my own curiosity, please tell me why you want to do
this, OK?
 
M

Mark R. Blain

I have a question...
1.What is a batch file?
2. How can I make a batch file tht will clear the screen and print the
contents of a specific file on the screen?
Thanks ahead of time and does anyone know of any msdos newsgroups?
By typing
cls filename.txt
will this create a batch or do I have to type something ahead of it first?

This sounds like a homework assignment.
 
C

Charles Dye

Now for the benefit of my own curiosity, please tell me why you want to do
this, OK?

Wasn't paying attention when the teacher explained the assignment...?
 
A

Al Dunbar [MS-MVP]

Mark R. Blain said:
first?

This sounds like a homework assignment.

Whether or not that is true, I would suggest that the OP needs something
more along the lines of a newsgroup for complete beginners. This is not it.

/Al
 
O

Opinicus

Wasn't paying attention when the teacher explained the assignment...?

Quite possibly. That didn't occur to me but then are they really still
teaching MS-DOS batch processing etc in the schools?
 
J

Joe Batch

1.What is a batch file?

A runable (with a .bat extension) plain text or ASCII file
containing one or more commands. Batch files are largely
used to automate tasks, but can do things not possible at
the prompt or in the Windows graphical user interface or
GUI.

2. How can I make a batch file tht will clear the screen and print the
contents of a specific file on the screen?

@echo off
if "%1"=="" echo. valid filename required
if not exist %1 echo. valid filename required
if exist "%1" cls
if exist "%1" type %1 |more

Thanks ahead of time and does anyone know of any msdos newsgroups?


If you use Windows NT/2000/XP+ you do not have DOS at all and
should inform your teacher who probably does not know. If you
do use Windows NT/2000/XP+, you posted to an appropriate group;
just lose the term "DOS" because what you have is a command line
interface or CLI (though it may resemble DOS superficially).
 
S

Seifer Almasy

are they really still
teaching MS-DOS batch processing etc in the schools?

I hope so. Batch files have been replaced for themost part, but for some things
they're indispensable. My entire enterprise-wide backups run from a nightly
batch file. It ended up being the easiest way to:

a) determine the date and time
b) reference a calendar and check to see what workstations are scheduled for
overtime (night or weekend)
c) run backups of server data (from Novell, Linux, Unix, and Windows servers)
like email, documents, databases
d) run backups of workstation data (from Windows, Mac, and a few Linux
workstations) like registries, user profiles, etc.
e) parse error logs system-wide and raise flags to my desktop
f) execute scripts on remote machines running different operating systems with
minimal human supervision

It's also all there, in plain text, so hopefully easy for my replacement to
figure out when I retire to Trinidad :)
 
A

Al Dunbar [MS-MVP]

Seifer Almasy said:
I hope so.

Do you (both) mean to say that there are (academic?) schools where they
actually *teach* this stuff?
Batch files have been replaced for themost part, but for some things
they're indispensable.

Not everything indispensible must be taught in school.

/Al
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top